Count Repeated Elements In An Array In Java Using Hashmap