How to count unique values by a grouping variable?
You can use PROC SQL with COUNT(DISTINCT variable_name) to determine the number of unique values for a column.