numDistinct

An other approach