結果 : count number of duplicate elements in array javascript