Grouping java spring aggregation

What is the best approach, giving more of these documents in my Mongo collection, to return a result that for each name in Tokio city contains the number of each name has logged via Google and Facebook, and how many times gived the consent as true or false ?

class User{
    private String name;
    private String city;
    private String login; //can be only Google or Facebook
    private Boolean consent // true or false


Result can be an array of these object like :

    "name": "Paul",
    "registration": {
      "Google": 55,
      "Facebook": 22
    "consent": {
      "true": 6,
      "false": 1

And I’m approaching with :

    Aggregation aggregation = Aggregation.newAggregation(
   // how build here
    AggregationResults<Result> res = mongoTemplate.aggregate(aggregation, "event", Result.class);

What’s the best way to make group and count?