Fixed #23877 -- aggregation's subquery missed target col

Aggregation over subquery produced syntactically incorrect queries in
some cases as Django didn't ensure that source expressions of the
aggregation were present in the subquery.
The col_cnt passes information of how the column alias index to use. So, the information is needed, even if the actual usage happens in rewrite_col().