title: MongoDB group by date and fill zero counts
body: <p>I would like to group my search results by date. The results are then also counted. </p>
  
  <pre><code>var fromDate = new Date(req.query.fromDate);
  var toDate = new Date(req.query.toDate);
  
  global.databaseStatistic.collection(global.ARTICLEPRESS).aggregate([
      {
          $match: {
              article: { $in: articleIdArray },
              date: { $gte: fromDate, $lte: toDate }
          }
      },
      {
          $group: {
              "_id": {
                  "date": {
                      $dateToString: { format: "%d.%m.%Y", date: "$date" }
                  }
              }, 
              "count": { $sum: 1 }
          }
      }
  ])
  </code></pre>
  
  <p>This works perfectly, but I would also like to show all days that have a count of zero. It should be so displayed every day within an interval, also having a count of zero. How can I do that?</p>