Used hashmap to find total count of every item