Fixed #23875 -- cleaned up query.get_count()

The query.get_count() can be significantly cleared up due to expressions API changes.
Same question for this change. Is it directly related to (required by) the count cleanup, or did the count cleanup just expose the aggregation code paths to some count tests that exposed latent un-tested bugs?