Counting and resetting are functional