added how to count keys or values in map