udpate counter