issue #21229: support count queries
issue #21229: ignore maxresults for count queries
issue #21229: return the value and not the function
issue #21229: get rest_query tests to pass
Merge pull request #1211 from shackbarth/21229-count

issue #21229: support count queries
Merge branch 'master' into 22390-email