  We prove mean and pointwise ergodic theorems for general families of averages
on a semisimple algebraic (or S-algebraic) group G, together with an explicit
rate of convergence when the action has a spectral gap. Given any lattice in G,
we use the ergodic theorems for G to solve the lattice point counting problem
for general domains in G, and prove mean and pointwise ergodic theorems for
arbitrary measure-preserving actions of the lattice, together with explicit
rates of convergence when a spectral gap is present.
  We also prove an equidistribution theorem in arbitrary isometric actions of
the lattice.
  For the proof we develop a general method to derive ergodic theorems for
actions of a locally compact group G, and of a lattice subgroup Gamma, provided
certain natural spectral, geometric and regularity conditions are satisfied by
the group G, the lattice Gamma, and the domains where the averages are
supported. In particular, we establish the general principle that under these
conditions a quantitative mean ergodic theorem for a family of averages gives
rise to a quantitative solution of the lattice point counting problem in their
supports.
  We demonstrate the new explicit error terms that we obtain by a variety of
examples.
