Abstract. For a locally compact second countable group G and a lattice subgroup Γ, we give an explicit quantitative solution of the lattice point counting problem in general domains in G, provided that i) G has finite upper local dimension, and the domains satisfy a basic regularity condition, ii) the mean ergodic theorem for the action of G on G/Γ holds, with a rate of convergence.The error term we establish matches the best current result for balls in symmetric spaces of simple higher-rank Lie groups, but holds in much greater generality.A significant advantage of the ergodic theoretic approach we use is that the solution to the lattice point counting problem is uniform over families of lattice subgroups provided they admit a uniform spectral gap. In particular, the uniformity property holds for families of finite index subgroups satisfying a quantitative variant of property τ .We discuss a number of applications, including: counting lattice points in general domains in semisimple S-algebraic groups, counting rational points on group varieties with respect to a height function, and quantitative angular (or conical) equidistribution of lattice points in symmetric spaces and in affine symmetric varieties.We note that the mean ergodic theorems which we establish are based on spectral methods, including the spectral transfer principle and the Kunze-Stein phenomenon. We formulate and prove appropriate analogues of both of these results in the set-up of adele groups, and they constitute a necessary step in our proof of quantitative results in counting rational points.