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.
Hmm, that doesn't quite answer my question. I understand that it's needed within `rewrite_cols`, but here in `get_aggregation` it is hardcoded to 0 initially, and the returned `col_cnt` is never used. So I still don't understand why a `col_cnt` variable is needed here in `get_aggregation`, rather than one of the two suggestions I made in my comment.