estimate

fun estimate(): Long

Estimate the number of distinct elements that have been added.

Uses the HyperLogLog harmonic-mean estimator with bias correction and a small-range linear-counting fallback for low cardinalities.