I often use Summary under Tables to get unique items. The pro is that we have good reasons to believe the underlying implementation is highly optimized. The con is that the approach has to generate a new table, which might be a non-negligible overhead.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
sumdt = dt << Summary(
Group( :age ),
Freq( "None" ),
Weight( "None" )
);
rh = nrow(sumdt);
close(sumdt,nosave);