count word frequency using hashMap