  Let $\Lambda = \mathrm{SL}_2(\Bbb Z)$ be the modular group and let
$c_n(\Lambda)$ be the number of congruence subgroups of $\Lambda$ of index at
most $n$. We prove that $\lim\limits_{n\to \infty} \frac{\log
c_n(\Lambda)}{(\log n)^2/\log\log n} = \frac{3-2\sqrt{2}}{4}.$ The proof is
based on the Bombieri-Vinogradov `Riemann hypothesis on the average' and on the
solution of a new type of extremal problem in combinatorial number theory.
Similar surprisingly sharp estimates are obtained for the subgroup growth of
lattices in higher rank semisimple Lie groups. If $G$ is such a Lie group and
$\Gamma$ is an irreducible lattice of $G$ it turns out that the subgroup growth
of $\Gamma$ is independent of the lattice and depends only on the Lie type of
the direct factors of $G$. It can be calculated easily from the root system.
The most general case of this result relies on the Generalized Riemann
Hypothesis but many special cases are unconditional. The proofs use techniques
from number theory, algebraic groups, finite group theory and combinatorics.
