Array Count Same Values Javascript Interview