I'm not sure you get the idea of aggregation.
We use the group by to make a set of aggregated info, then the aggregate functions like sum(), avg() or count() can operate over that set. So, how can we group by a field that doesn't exist yet?
select max(field1), max(field2), count(*) as cnt
group by cnt
could be rewritten as:
select max(field1), max(field2), count() as cnt
group by count()
but how (or more importantly, WHY) do you want to group by count()??? Count() only has one output, the total row count, not very useful. I.e. you'd get ONE data set for aggregation.