Flajolet-Martin Algorithm: An Efficient Solution for Counting Distinct Elements