You can use Tables > Summary. Here's a JSL version:
dt = open("$sample_data/Big Class.jmp");
dt << Summary( Group( :sex ), N );
There's also the SUMMARIZE command in JSL. You need a numeric column to get this to work though:
summarize(gsex = by(:sex), gcount = count(:height));
print(gcount);
[18, 22]