reset counter to avoid integer overflows