Let Gm,k := Z/mZ × Z/mkZ be an abelian group of rank 2 and order N = mk 2 . When does there exist a ﬁnite ﬁeld Fp and an elliptic curve E/Fp such that E(Fp ) ≃ Gm,k ? We show that this happens with probability 0 when k is very small with respect to m, and with probability 1 when k is big enough with respect to m. The fact that the groups Gm,k are more likely to occur when k is big is reminiscent of the Cohen-Lenstra heuristics which predict that a random abelian group G occurs with probability weighted by #G/#Aut(G). By counting the average number of times that a given group Gm,k occurs over the ﬁnite ﬁelds Fp (and not simply when a given group occurs or not), we are able to verify that the probability of occurrence of the groups Gm,k is indeed weighted by the Cohen-Lenstra weights. This is joint work with V. Chandee, D. Koukoulopoulos and E. Smith.