Jim's answer is great; here are two more that avoid creating a column but have different side effects:
dt = Open( "$sample_data/big class.jmp" );
// using table subscripts, suitable for use in a column formula.
// As Constant calculates the result once, not for every row.
As Constant( N Rows( Loc( dt[0, "age"] < 15 ) ) ); // 27
// using row selection, suitable for JSL programs. Avoids a temporary
// matrix but does change the selection state of the table.
dt << selectwhere( age < 15 );
N Rows( dt << getselectedrows ); // 27
What you choose depends a bit on whether you'll use it in a column formula or in a JSL program; JMP added the As Constant function (mostly) to support column formulas that need to make an expensive calculation. Without it, JMP would count the number of rows for every row, leading to N^2 performance issues.
Explaining the first example: dt[0,"age"] returns a matrix from the table (post). 0 means all rows. Comparing that matrix with < 15 returns a matrix of 0 and 1 results. Loc([ 1 0 1 0]) returns a smaller matrix of the locations of the non zero (true) results. NRows or NItems reports the number of elements. As Constant isn't needed in a JSL program if you capture the answer in a variable.
Craige