Counter visit refactored in increment_counter method