So I have this code:
db.collection.find( { sex: 'Male' } ).count()
and what I want to do is also count sex: 'Female' at the same time instead of
db.collection.find( { sex: 'Male' } ).count()
db.collection.find( { sex: 'Female' } ).count()
Is there a way to do it in a single query? Because I am generating a pie chart based on their length. Any help would be much appreciated.