There isn't a general formula, but the number of groups has been tabulated for a large number of values.
http://people.csse.uwa.edu.au/gordon/remote/cubcay/ has a list of the number of groups up to order 1000. An interesting error causes it to say the number of groups of order 512 is -1, but it is actually 10,494,213.
Mathematica 7 includes the function FiniteGroupCount, which will tell you the number of groups of a given order, up to 2047.