Fine-grained probability counting for cardinality estimation of data streams