Dimension, volume, and spectrum of a Riemannian manifold