結果 : count of duplicate elements in an array javascript