I'm trying to figure out how to make the number count to ten then go back down to 1.
This is more idiomatic than R. Betts' answer:
With an added benefit that it won't start malfunctioning after 16777216 frames (which I imagine you will never reach for multiple reasons, two of which are that it would take too much time to render that many frames, and that if you tried, Blender would probably crash before you reached that frame…)
However if your question isn't some simplified example of an actual problem, the real solution is to replace the entire simulation zone in Robin's answer with Scene Time: Frame node.
Also for a very similar reason to the 16777216 frames thing mentioned above, my setup can stop reversing if the counter exceeds that value (if the max value is higher).