text: Title: Add `nunique`
  Body: ### Is your feature request related to a problem?
  
  From https://github.com/pydata/xarray/issues/9544#issuecomment-2372685411
  
  > Though perhaps we should add nunique along a dimension implemented as sort along axis, succeeding-elements-are-not-equal along axis handling NaNs, then sum along axis.
  
  > xref [pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.nunique.html](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.nunique.html)
  
  I think I'd add it to https://github.com/pydata/xarray/blob/main/xarray/util/generate_aggregations.py
  