update the increment and decrement statements in counter