title: How to Group and get Count using morphia in mongoDB?
body: <p>I'm using Morphia with MongoDB in Java, and i have collection like this </p>
  
  <pre><code>{"_id":"5d5e7ce7869eef030869e85c",
      "ip":"66.249.79.181",
      "date":"2019-08-19T18:30:00.000Z",
      "request_url":"https://www.example.com/home", 
      "status_code":"200", 
      "bot":"Google Android",
      "type":"type/html",
      "domain":"https://www.example.com"},
  
  {"_id":"5d5e7ce7869eef030869e85c",
      "ip":"66.249.79.181",
      "date":"2019-08-19T18:30:00.000Z",
      "request_url":"https://www.example.com/home", 
      "status_code":"200", 
      "bot":"Google",
      "type":"type/html",
      "domain":"https://www.example.com"},
  
  {"_id":"5d5e7ce7869eef030869e85c",
      "ip":"66.249.79.181",
      "date":"2019-08-19T18:30:00.000Z",
      "request_url":"https://www.example.com/home", 
      "status_code":"200", 
      "bot":"bing",
      "type":"type/html",
      "domain":"https://www.example.com"}
  </code></pre>
  
  <p>i need to using grouping("request_url") and get count of "bot" field what if I need result like this </p>
  
  <pre><code>{"request_url":"https://www.example.com/home",
   "status_code":"200",
   "Google": 1,
   "Google Android": 1,
   "bing": 1,
   "type":"type/html", }
  </code></pre>
  
  <p>How can i do this group by "request_url" Field and get Count of each "bot" Field have</p>