Error - Dgraph groupby query while returning zero results

The count() actually helps in giving an top level aggregate of all nodes used in the group by operation. And count(uid) was returning count of each individual group.

It helped us retrieve results in one query instead of 2. Instead of removing the functionality , just correctng the json stucture helps so that only count is returned in a valid json.