The Cohen-Lenstra measure on the set of abelian p-groups assigns $\mathbb{P}(G) = \prod_{i \geq 1} \left( 1 - \frac{1}{p^i}\right) \cdot |\mathrm{Aut}(G)|^{-1} $. Apparently, this is equivalent to taking cokernels of random maps $f: (\mathbb{Z}_p)^N \to (\mathbb{Z}_p)^N$ and letting $N \to \infty$. These are the p-adics and there is a Haar measure on this linear space of maps. Alternatively, choose random maps between the finite groups: $f: (\mathbb{Z}/p^k\mathbb{Z})^N \to (\mathbb{Z}/p^k \mathbb{Z})^N$ and let $k, N \to \infty$.
Q: If G is a random abelian p-group according to the Cohen-Lenstra measure and A is a deterministic, why is the expected number of surjections $\phi: G \to A$ equal to 1? In fact, if G were deterministic I don't think this number could ever be 1 unless |G| = 1.
For references see Section 8 of Homological stability for Hurwitz spaces and the Cohen-Lenstra conjecture over function fields by Ellenberg, Venatesh and Westerland or Terry Tao's blog entry At the AustMS conference.