You.
Its just keeping track how many times you pick the image button. We start by setting it to a value of 1 then re-cycle back after you've gone through all the images.
In essence what this does is cycle through images in the same image button, and also may cycle different settings.
Without having to create an entire set of image buttons you can just have one image button and a pull-down below to just go directly to the source image.