counter is never really set to infinity, just a large number; it will roll over to negative numbers at some point. To get max range out of a counter, try setting the max to 2147483647, which is 7FFFFFFF in hex.
I don’t know if something changed recently, but setting the max to 0 does not work for me. The highest number it can count to is 7FFFFFFF, though, for sure. I had inside information; I wrote the counter object originally, but I haven’t done maintenance on it for over a decade.