  We prove an upper and a lower bound on the rank of the spectral projections
of the Schr\"odinger operator $-\Delta + V$ in terms of the volume of the
sublevel sets of an effective potential $\frac{1}{u}$. Here, $u$ is the
`landscape function' of [(David, G., Filoche, M., & Mayboroda, S. (2021)
Advances in Mathematics, 390, 107946)], namely a solution of $(-\Delta + V)u =
1$ in $\bbR^d$. We prove the result for non-negative potentials satisfying a
Kato-type and a doubling condition, in all spatial dimensions, in infinite
volume, and show that no coarse graining is required. Our result yields in
particular a necessary and sufficient condition for discreteness of the
spectrum. In the case of polynomial potentials, we prove that the spectrum is
discrete if and only if no directional derivative vanishes identically.
