結果 : how to count duplicate elements in array in javascript