I cannot come up with an easy way to do this with a single query.
If I understand your question, you want basically three counts for each query you submit
- The count of the query results actually returned - ( easily obtained via 'results.length' )
- The count of the query results that would have been returned without any skip or take ( obtained via the ".inlinecount()" method on the query.
- The count of the query results that would have been returned without any filter or skip or take. i.e. the count of the entire "resource". ( This one is difficult without a separate query).
If this is correct, then I think that you are stuck with performing two queries, one to get the count for the entire "resource" (i.e. #3 above) and another using the "inlinecount" method for #1 and #2