? geting the number of jpg's as a variable from a folder


how can i give a value to my variable depending on how many .jpg’s i have
in my pictures folder.
lets say I have 53 jpg’s in the pictures folder and I need myvariable=53,
and if i put the 54th in, flash should update this value on _root.onLoad or on
what ever.