1. A method, comprising: partitioning a dataset into a full set of logical data units; selecting a sample subset of the full set, the sample subset comprising a random sample of the full set based on a sampling ratio; selecting, from a full range of hash values, a set of target hash values; calculating, using a hash function, a respective unit hash value for each of the logical data units in the sample subset; computing a histogram indicating a duplication count of each of the unit hash values that matches a given target hash value; and estimating, based on the histogram, a number of distinct logical data units in the full set.