Suppose that you want to count the number of child text boxes in a list box. The most reliable way is to use XPath to find a specific string in the text boxes and then use N Items() to count the number of text boxes.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate(
Y( :weight ),
X( :height ),
Group By( :age ),
Fit Line( {Line Width( 3 )} )
);
N Items( biv << XPath( "//ListBox[starts-with(TextEditBox,'Linear Fit age==')]" ) ); // start with the root list box, find a text edit box
// that starts with “Linear Fit age==”, and count the number of children