And an example using the Proc Freq nlevels option:
ods select nlevels;
proc freq data=sashelp.class nlevels;
tables sex;
run;
the ODS Select nlevels; instructs SAS to only show the levels information which would be the number of unique values and missing values if any.
... View more