To expand Patrick87's comment and help you better understand the probabilistic counting algorithm : Linear Counting is used to get an approximate value of the number of distinct elements in a big set $S$ using a small amount of space.
Suppose that you have a set of 1000 of names and you want to know how many distinct names are present in it. In the worst case (all names are distinct) you should use an array of 1000 names. But if you only want an approximation, then you can use a hash function to map the names to a much shorter bitmask of $m$ bits.
Suppose that $d$ is the number of distinct names. $L = d/m$ is the load factor.
If $L$ is low ($L < 1$) then few distinct names will be mapped (by the hash function) to the same bit, and the number of $1s$ in the final bitmask will be a good approximation of the "density" of distinct names in $S$;
If $L$ is greater than 1 ($L > 1$), then certainly (pigeonhole principle) some distinct names will be mapped to the same bit; but nevertheless the number of $1s$ in the final bitmask can still be used to approximate the number of distinct elements in $S$;
If $L$ is high ($L \gg 1$) then many distinct names will be mapped (by the hash function) to the same bit, and probably all bits of the mask will be set to 1; in this case you cannot recover the number of distinct items in $S$ from the bitmask (and you should increase $m$).
If you use a random function instead of the hash function, you'll always end with all bits set to 1 (like in the case $L \gg 1$), and you cannot use it to approximate the number of distinct elements.
Returning to our example, suppose that there are only 2 distinct names, and $m$ = 10.
Using a hash function, the 1000 names will set 2 bits in the mask (or less probably 1 bit if they collide) and the approximate number of distinct names is $-10 \ln (8 /10) = 2.23$
Using a random function, the 1000 names will set all 10 bits in the mask, and the formula cannot be even applied.