How to implement the concurrent query of foreach in the shell statement of mongodb

forEach:
var types = [a,b,c]
var get_count = function(type){var one_count = db.collection.find({“type”:type}).count())}
var result = types.forEach(get_count)

Similar to the above foreach statement, how to query different type concurrently in mongodb’s shell.