title: Which is the fastest way to count elements in array
body: <p>I have a massive list which contains a country_names, many times. 
  I would like to create a new list (smaller) which will contain a sum for how many times a country is included in the bigger list.</p>
  
  <pre><code>[
        {
            "country_name": "US"
        },
        {
            "country_name": "US"
        },
        {
            "country_name": "GERMANY"
        },
        {
            "country_name": "GERMANY"
        },
        {
            "country_name": "GERMANY"
        },
        {
            "country_name": "ITALY"
        },
        {
            "country_name": "ITALY"
        },
        {
            "country_name": "ITALY"
        },
        {
            "country_name": "ITALY"
        }
  ]
  </code></pre>
  
  <p>which is the fastest way to generate a new list with this data. I would like something like this: I can do it with a for loop but it is way too slow. Any alternatives ? </p>
  
  <pre><code>[
        {
            "country_name": "US",
            "count": 2
        },
        {
            "country_name": "GERMANY",
            "count": 3
        },
        {
            "country_name": "ITALY",
            "count": 4
        },
  ]
  </code></pre>