title: Count all the calls to add key-value in Hashmap
body: <p>While going through the HashMap implementation and some tutorials, I thought of this question. But not getting how to solve this. So posting here if you guys can help me out. I want to keep a count of all the calls to add each key-value pair in a Map. It should count the calls to put, putAll and putIfAbsent all the methods too.</p>