How to determine the number of isomorphism types of groups of a given order? if $G$ is a group whose order is $n$ can we determine the number of isomorphism types for this number or not ? 
for instance, if $n=4$ we have 2 types, $Z_4$ and $Z_2 \times Z_2$ " Klein 4-group"
for any number n, is a similar calculation possible ? 
in other words, let $P$ is a function from Natural numbers into natural numbers which for any number $n$ gives the number of possible structures for a group of order $n$
can we find a formula for this function in terms of $n$ and using operation like addition, multiplication, etc ? 
 A: In view of all the information about how difficult and large $P(n)$ is, I should add the slightly consoling fact that it is algorithmically computable (and in fact primitive recursive).  The reason this is only slightly consoling is that I can't think of an algorithm significantly better than a brute force search through all the groups, nested with brute force searches for isomorphisms between them.
A: There is a nice table on OEISWiki which shows the number of isomorphism classes for a group of order n - you should notice that they are quite sporadic. In particular, for groups of order $2^n$, the number of isomorphic classes grows quite considerably, especially relative to groups of similar size.
A: If you are seriously interested in this topic, you could look at the paper
Hans Ulrich Besche, Bettina Eick, and E.A. O'Brien.
A millennium project: constructing small groups.
Internat. J. Algebra Comput., 12:623-644, 2002,
which describes how the groups of order up to 2000 (which can be accessed in the GAP or Magma small groups library) were computed.
