title: How do I count duplicates in an array with Ramda?
body: <p>I have an array with duplicate values and I need to find out how many times each value occurs in the array using ramda.js.</p>
  
  <p>This is my array:
  <em>[2013, 2013, 2013, 2014, 2014, 2014, 2014, 2015, 2015, 2015, 2015, 2015, 2015, 2015, 2016, 2016, 2016, 2016, 2016, 2017, 2017, 2017]</em></p>
  
  <p>This is what I want to get out of it:
  <em>[3, 4, 7, 5, 3]</em></p>
  
  <p>Here's an example of how it might work in pure JavaScript.</p>
  
  <pre><code>function count (arr) {
    const counts = {}
    arr.forEach((x) =&gt; { counts[x] = (counts[x] || 0) + 1 })
    return Object.values(counts)
  }
  </code></pre>