implementation of the HyperLogLog algorithm.