added a counter for mapped values