title: count item of objects but with differents key values
body: <p>I have an array with duplicates items, i want to count them with an array of objects, but my code doesn't work.</p>
  
  <pre><code>var array = ['far-picto_tout_compris','far-picto_tout_compris','far-picto_tout_compris',
  'far-picto_sour','far-picto_sour', 'far-picto_serenite',
  'far-picto_serenite','far-picto_serenite',];
  
  var res = array.reduce((acc, val, index) =&gt; {
        acc.push({[val]: 1});
        return acc;
      }, []);
  </code></pre>
  
  <p>I want [{far-picto_tout_compris: 3}, ...]</p>