function getCount(nums) {
  const counts = new Map();

  for(let n of nums) {
    if(counts.has(n)) {
      counts.set(n, 1 + counts.get(n));
    } else {
      counts.set(n, 1);
    }
  }

  return counts;
}
Get repeated number count
Runtime: O(n)
@param {array} nums
@returns {Map} counts