You could do this a few different ways, the first one that comes into mind is having a variable which holds the number of items that you are going to load (images in this case) and then have your setProgressBarRange set to this variable.
For example:
ImgName$(0)="Logo1.bmp"
ImgName$(1)="EndofTheWorld.png"
ImgName$(2)="roflomfg.bmp"
TotalImagesToLoad= ARRAY COUNT(ImgName$(0))
setProgressBarRange MyProgressBar,1,TotalImagesToLoad
for x=0 to TotalImagesToLoad-1
LoadImage(ImgName$(x),x+1)
next x
Function LoadImage(MyImage$,ImgNum)
Load Image MyImage$,ImgNum
setProgressBarPos MyProgressBar,ImgNum
ENDFUNCTION
I didn't test the code out in the compiler, I just kind of threw it together for you in this forum post. There may be a typo or a bug or two
But the underlying concept is there. Give it a go
"We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." - Aristotle