If you need to find the length of an object, and I mean the number of children of the specified object, use the following function/method:
public static function getLength(o:Object):uint
{
var len:uint = 0;
for (var item:* in o)
if (item != "mx_internal_uid")
[...]