結果 : count occurrences using hashmap