title: Aggregate array occourances
body: <p>I have a set of documents (<em>posts</em>) which have an array of users mentioned in each post.</p>
  
  <pre><code>{
      "title": "Some post title",
      [ ... ]
      "mentions": ["johnsmith", "johndoe", "paul"]
  }
  </code></pre>
  
  <p>I want to aggregate a list of unique mentions, and the number of times they've been mentioned across all posts. For example:</p>
  
  <pre><code>[{ user: "johnsmith", count: 5 }, { user: "benlewis", count: 9 }, { user: "johndoe", count: 1 }]
  </code></pre>
  
  <p>With Mongo, I'd do something like:</p>
  
  <pre><code>"mentions": [{
      "$unwind": "$mentions"
  }, {
      "$group": {
          "_id": "$mentions",
          "count": { "$sum": 1 }
     }
  }]
  </code></pre>
  
  <p>What's the equivalent in Elasticsearch?</p>