We relate the singularities of a scheme X to the asymptotics of the number of points of X over finite rings. This gives a partial answer to a question of Mustata. We use this result to count representations of arithmetic lattices. More precisely, if Γ is an arithmetic lattice whose Q-rank is greater than one, let rn(Γ) be the number of irreducible n-dimensional representations of Γ up to isomorphism. We prove that there is a constant C (for example, C=746 suffices) such that rn(Γ)=O(nC) for every such Γ. This answers a question of Larsen and Lubotzky.