結果 : count occurrences of each element in an array python