3D Slideshow Gallery - GalleryItemChangedEvent

I wish to increment a counter variable that will trigger a change text event in a text box on the page after every 5 pictures have shown. Is it possible to do this?