Algorithms for counting downloads