set the range to 1 greater in each direction, so [counter -1 4 2] for your example.
add a [sel -1 4] object to the output. The rightmost outlet of [sel] lets the values out that you want. Both of the other two should bang the counter so there's no appreciable delay as it hits the extreme values, then it'll go back into the range of values you want. You could use [split] in the same way.
Try it out, I can't try it here so maybe there's stuttering, but I think it should be OK...
I asked the same question years ago, and someone kindly provided me with this (you are excused for not finding it via a search, because it would have been on the old McGill mailing list ;-)
Inlets are count min and max,