title: Count duplicates and order them in array of objects Javascript
body: <p>I have the following array of objects:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>[
    {
      id: 1,
      someOtherStuff: 'abc,
      Drink: { name: 'Coca-Cola', price: 2.5 }
    },
    {
      id: 2,
      someOtherStuff: 'def,
      Drink: { name: 'Fanta Orange', price: 3 }
    },
    {
      id: 3,
      someOtherStuff: 'ghi,
      Drink: { name: 'Sprite', price: 1.8 }
    },
    {
      id: 6,
      someOtherStuff: 'jkl,
      Drink: { name: 'Coca-Cola', price: 2.5 }
    },
    {
      id: 7,
      someOtherStuff: 'mno,
      Drink: { name: 'Coca-Cola', price: 2.5 }
    }
  ]</code></pre>
  </div>
  </div>
  </p>
  
  <p>i want to group them by duplicates like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>[
    {
      count: 3,
      drinkName: 'Coca-Cola',
      price: 2.5
    },
    {
      count: 1,
      drinkName: 'Fanta Orange',
      price: 3
    },
     {
      count: 1,
      drinkName: 'Sprite',
      price: 1.8
    }
  ]</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have tried in several ways to map a new array.But unfortunately I can't get it to work</p>
  
  <p>I hope someone can help me with that</p>