Count specific filenames from a folder

I have this question but do not know how to begin.
Let say I have some images in [COLOR=“RoyalBlue”]c:\img[/COLOR] they are:
[COLOR=“RoyalBlue”]photo-1.jpg photo-2.jpg photo-3.jpg image-1.jpg image-2.jpg image-3.jpg[/COLOR]

I would like to count how many file begin with “[COLOR=“RoyalBlue”]photo-[/COLOR]”, what should I do in actiionscript3? ;(