[22:24:44] <c4017> I have a pipeline whose last stage is a limit to limit the amount of data returned (for pagination / so I don't have to fetch ALL the results at once)
[22:25:08] <c4017> I'm trying to determine how many documents are present before this limit command
[22:26:14] <c4017> Of course I can do two separate queries, one ending in {"$count": count} to get # of results, and another one ending with limit, but then the server has to perferm the whole aggregation twice
[22:27:29] <c4017> Can I somehow compute the # of documents and put that in a new filed in one/all document before the limit?
[23:01:07] <c4017> Not exactly what I wanted, but this works: https://stackoverflow.com/questions/20348093/mongodb-aggregation-how-to-get-total-records-count