Abort the count if mode is changed part way through