n_distinct function

Count the number of unique values in a vector