set a counter