The number of elements of order 2 in a group is fairly restricted: 0, odd, or infinity. All such possibilities occur already in the trivial group and in dihedral groups.
The number of elements of order 3 in a group can be shown to be similarly restricted: 0, 2 mod 6, or infinity. However, something strange happens: not all possibilities can be realized.
Even worse, there is a fairly small number that I cannot decide whether it is or is not the number of elements of order 3 in a finite group:
Is there a group with exactly 92 elements of order 3?
More boldly, I would like to know (but feel free to answer only the first question):
Exactly which numbers occur as the number of elements of order 3 in a group?
Background: Such questions were studied a bit by Sylow and more heavily by Frobenius. The theorem that the number of elements of order p is equal to −1 mod p is contained in one of Frobenius's 1903 papers. Since elements of order 3 come in pairs, this doubles to give 2 mod 6 for p=3.
However, Frobenius's results were improved some 30 years later by P. Hall who showed that if the Sylow p-subgroups are not cyclic, then the number of elements of order p is −1 mod p2.
If the Sylows are cyclic of order pn, then the number of subgroups of order p is congruent to 1 mod pn by the standard counting method. If the Sylow itself is order p, then the subgroup generated by the elements of order p acts faithfully and transitively on the Sylow subgroups, so for small enough numbers, the subgroup can just be looked up.
In all cases, we can assume the group is finite since the subgroup generated by the elements of a fixed order is finite (assuming there are only finitely many elements of that fixed order).
Easier example: For instance there is no group with exactly 68 elements of order 3, since such a group would have cyclic Sylow 3-subgroups by Hall, order 3 Sylows by the counting, but then would have 34 Sylow 3-subgroups, and so (the subgroup generated by the elements of order 3 would) be a primitive group of degree 34. One checks the list of primitive groups of degree 34 (that is, A34 and S34, both with ginormous Sylow 3-subgroups) to see no such group exists.
One could also try 140, but the action need not be primitive so the table lookup is harder. Such a group has Sylows of order 3, but is not solvable, so is somewhat restricted.