ee.Reducer.countDistinct

Returns a Reducer that computes the number of distinct inputs.
UsageReturns
ee.Reducer.countDistinct()Reducer

No arguments.