As long as your numbers are in order, you can also use an incrementing value, like so:
Button On Clicked
AnimationFrame < 4 - Set Animation Frame to Animation Frame+1
Else - Set Animation Frame to 0
Or to be extra compact, you can use a conditional operator (advanced):
On Clicked - Set Animation Frame to Sprite.AnimationFrame<4?Sprite.AnimationFrame+1:0