How to count the number of image files in a folder

Hi all, does anyone knows how to count the number of image files in a folder?

The swf is gonna be launched locally, not on a server… so i guess php is not gonna work… The photos are gonna be named according to the person in the photo, so i can’t count using the naming method ( 1.jpg, 2.jpg ) also…

Help Pls!!!

If you dont need dynamic approch use xml ( not a good solution )

Or use a socket-server or use a container made in C++

if you have budget go for ZINC