cycle/iteration counting: don't rely on enum indexes

Only count it as an "iteration" when we wrap around, or if we aren't cycling.

Signed-off-by: Steven Noonan <steven@uplinklabs.net>