I'd look up the "FindAllChildren" method in the TC help.
That method will search the object doing the calling for any child objects that match a set of criteria and return an Array of those objects. A "VarArrayHighBound" call can then find the size of the array which would be your count. Additionally, you could then iterate through that array and randomize the selection of them.
Automated Testing Evangelists
Definition expert - noun - Unknown drip under pressure