title: Get count of array elements of multiple documents in MongoDB
body: <p>I need to know total count of tags in <code>mongodb</code>. For example in below documents there are total 5 tags.</p>
  
  <p>My documents are like-</p>
  
  <pre><code>{ 
      "_id" : ObjectId("59c2102e2526c34768e405f5"), 
      "Name" : "Ashish", 
      "tags" : [
          "java", 
          "python", 
          "c"
      ]
  },
  { 
      "_id" : ObjectId("62c2102e2526c34768e405l8"), 
      "Name" : "Binay", 
      "tags" : [
          "Dotnet", 
          "perl"
      ]
  }
  </code></pre>