Count number of files in dir

hey folks… ok … basically the title already is my question…

is it possible to count the number of files in a directory given, using flash… and if yes… how??

thx in advance…

yours sincerly