issue #23108: get count queries to work