Counting MovieClip on Stage through script

Can someone help me on how to count the movieclip on the stage? for example i have duplicate a movie through an action script and i want to return the number of movie clips to a dynamic text.

HELP! thanks

You could use a for…in loop…

http://www.kirupa.com/developer/actionscript/tricks/forin.asp

What is your method of duplication though? Can you provide the script or an example .fla file … there could be an easier way.