MongoDB add grand total to sortByCount() in an aggregation pipeline
I have grouped all the users by country, but I would also like to have a row showing the grand total (users are tagged to a single country in our use case). Data Model / Sample Input The collection is…