Ah, you are actually wanting something originally created called a "shadowbox".
You can find it here
http://mjijackson.com/shadowbox/.
I have used this on multiple sites of mine, if you would like demos just follow the links below:
-http://www.alexhess.com
-http://www.exomagic.com
Here is what you do,
-First, download and install the shadowbox script.
-Install the snippet of source-code required to be included into your forum header (read the shadowbox readme instructions).
-Once fully installed, add to the style where the images/pages are being displayed "rel="shadbowbox". From here you can issue commands like width, height, etc....
It will automatically setup a gallery (with the numbering) that you mentioned.
If you would like assistance please contact me privately.
Thank you,