title: Mongo Facet Aggregation with Sum
body: <p>Trying to figure out something simple in this aggregation.  The field "totalArrests" under metadata is coming back 0.  It's not able to sum this field from the previous stage for some reason. Please advise.</p>
  
  <pre><code>const agg = await KID.aggregate([
          { 
              $group: {
                  _id: "$source", // group by this
                  title: { "$last": "$title"},
                  comments: { "$last": "$comments"},
                  body: { "$last": "$body"},
                  date: { "$last": "$date"},
                  media: { "$last": "$media"},
                  source: { "$last": "$source"},
                  count: { "$sum": 1},
                  arrestCount: { "$sum": "$arrested"},
                  rescuedCount: { "$sum": "$rescued"},
              }
          },
          // sorting
          {
              $sort: {date: sort}
          },
          // facets for paging
          {
              $facet: {
                  metadata: [ 
                      { $count: "total" },  // Returns a count of the number of documents at this stage
                      { $addFields: { 
                          page: page, 
                          limit: 30,
                          totalArrests: {$sum: "$arrestCount"}
                      }},
                  ],
                  kids: [ { $skip: (page-1)*30 }, { $limit: 30 } ]
              }
          },
      ]);
  </code></pre>
  
  <p>Here is a sample document in the collection. </p>
  
  <pre><code>[
    {
      _id: 5e8b922aaf5ccf5ac588398c,
      counter: 4,
      date: 2017-01-01T17:00:00.000Z,
      name: 'Steven Tucker',
      arrested: 1,
      rescued: 0,
      country: 'US',
      state: 'NH',
      comments: 'Sex trafficking of a minor',
      source: 'https://www.justice.gov/opa/pr/new-hampshire-man-indicted-sex-trafficking-minor-connection-interstate-prostitution',
      title: 'New ....',
      body: 'Steven Tucker, 31, ....',
      __v: 0,
      media: {
        title: 'New Hampshire Man Indicted for Sex ...',
        open_graph: [Object],
        twitter_card: [Object],
        favicon: 'https://www.justice.gov/sites/default/files/favicon.png'
      },
      id: 5e8b922aaf5ccf5ac588398c,
      text: 'New Hampshire Man Indicted',
      utcDate: '2017-01-01T12:00'
    }
  ]
  </code></pre>