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

The query.get_count() can be significantly cleared up due to expressions API changes.
I see. And presumably the count aggregation results in this case, whereas we never previously had such a case?