Scottys gallery with numeric buttons?

hello,
I´m new here and I like taht forum very much. I found the fantastic resize-gallery of scotty and tried to modifie it for me.

But I´ve no idea how to change the thumbnails to numbers. So that the number of pics is taken out of the XML File and automaticly displayed and You can use them as buttons. Has anyone an idea?

thanx