Returns the number of items in a collection.
Collection.Count
Returns a Long value.
Response.Write "We have " & Family.Childrens.Count &
" kids and they are named:<br>"
For iItem = 0 to Family.Childrens.Count-1
Response.Write Family.Childrens(iItem) +
"<br>"
Next
The same could be written using the For Each syntax:
For Each child In Family.Childrens
Response.Write Family.Childrens(child) +
"<br>"
Next
Because numbering for members of a collection begins with zero, you should always code loops starting with the zero member and ending with the value of the Count property minus 1. In VBScript it is preferable to use the For Each ... Next syntax.