How many groups of order $2016$ exists, which are a direct product of smaller groups? There are $6538$ groups of order $2016$ upto isomorphism.

How many groups of order $2016$ are a direct product of (at least two) smaller groups ?

I calculated an upper bound by summing the products of $gnu(j)\times gnu(\frac{2016}{j})$ over the divisors $j$ of $2016$ with $1<j\le \sqrt{2016}$, but his sum is even larger than $6538$. 
I constructed the direct products, but it is virtually unfeasible to count how many groups are pairwise non-isomorphic with. for example, SONATA. 
So, which restriction to the groups do I need to find out the required number ?
 A: GAP has an undocumented attribute DirectFactorsOfGroup which is used by StructureDescription. With its help, I've calculated that there are 3079 groups for which DirectFactorsOfGroup can not find factorisation into the direct product, hence the remaining 3459 groups of order 2016 are direct products. 
Just in case of DirectFactorsOfGroup works under some assumptions and may miss some factorisations (after all, it's not documented!), I think it is safe to say that there are AT LEAST 3459 groups of order 2016 which are direct products of smaller groups.
I guess that your calculation of the upper bound returned $7466$ groups:
gap> n:=Filtered([2..46],i -> IsInt(2016/i));
[ 2, 3, 4, 6, 7, 8, 9, 12, 14, 16, 18, 21, 24, 28, 32, 36, 42 ]
gap> Sum(List(n,j->NrSmallGroups(j)*NrSmallGroups(2016/j)));
7466

which is more than twice more. This is not surprising, since some groups may be represented as direct products in more than one way. 
It should be still feasible to generate these 7466 direct products and then classify them up to isomorphism. You need to start to break their set into clusters using some easily computed invariants (e.g. the order of the centre, the number of conjugacy classes etc.) and then refine them using more and more invariants, and apply hard tests only to the refined clusters.
