Solve the following NoSQL Database questions using MongoDB(SOFTWARE).
Describe what the following query does:
db.restaurants.aggregate( {$group: {_id: "$borough", aggregate: {$sum: 1}}} )