title: Cosmos DB query element count
body: <p>I would like to find find how many times an element occurs.From the sample I want to get the element count. If we see the data. Elements appear twice also the inner element like Name appears twice. Like that I want to find the count of element occurrence. </p>
  
  <p>I tried seeing some group by clause and could not find any group by option in CosmosDB.</p>
  
  <p>{ "data": [ [ { "Elements": [ { "Name": "Ma", "Gender": "Male", "City": "Newyork", "State": "Newyork" }, { "Gender": "Female", "City": "Los Angeles", "State": "California" }, { "Name": "Bruce", "Gender": "Male", "City": "Chicago" } ], "Subdivided": [ { "Low": "20", "Block": "227", "Subcode": "MIRROR", "Legal_Desc_Map_Plat_Type_Indicator": "PLA" } ], "Elements": [ { "Name": "Ma", "Gender": "Male", "City": "Newyork" }, { "Gender": "Female", "City": "Los Angeles", "State": "California" }, { "Name": "Bruce", "Gender": "Male", "State": "Illinois" } ] } ] ], "_ts": 1559463991 }</p>
  
  <p>Result something like.
  Element = 2, Element.Name = 2 etc like that.</p>
  
  <p><a href="https://i.stack.imgur.com/keUVE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/keUVE.png" alt="See screen for some info"></a></p>