working counter and reset