initial version of the count query
also add number of installations for variant to count query
added counts