  Let $\C(\Gamma)$ be the set of isomorphism classes of the finite groups that
are homomorphic images of $\Gamma$. We investigate the extent to which
$\C(\Gamma)$ determines $\Gamma$ when $\Gamma$ is a group of geometric
interest. If $\Gamma_1$ is a lattice in ${\rm{PSL}}(2,\R)$ and $\Gamma_2$ is a
lattice in any connected Lie group, then $\C(\Gamma_1) = \C(\Gamma_2)$ implies
that $\Gamma_1$ is isomorphic to $\Gamma_2$. If $F$ is a free group and
$\Gamma$ is a right-angled Artin group or a residually free group (with one
extra condition), then $\C(F)=\C(\Gamma)$ implies that $F\cong\Gamma$. If
$\Gamma_1<{\rm{PSL}}(2,\Bbb C)$ and $\Gamma_2< G$ are non-uniform arithmetic
lattices, where $G$ is a semi-simple Lie group with trivial centre and no
compact factors, then $\C(\Gamma_1)= \C(\Gamma_2)$ implies that $G \cong
{\rm{PSL}}(2,\Bbb C)$ and that $\Gamma_2$ belongs to one of finitely many
commensurability classes.
  These results are proved using the theory of profinite groups; we do not
exhibit explicit finite quotients that distinguish among the groups in
question. But in the special case of two non-isomorphic triangle groups, we
give an explicit description of finite quotients that distinguish between them.
