Another solution which uses $group
and 1. does not require to know that there should be some empty values and 2. gives a more detailed view of the data – which I like.
db.trips.aggregate([
{$group:
{_id: "$birth year", count: {$sum: 1}}
},
{$sort: {"_id": -1}}
])