
A computer scientist suggests using an algorithm called CVM to count unique animals or users, which requires remembering only a small number of entries instead of the entire list. The CVM algorithm solves the distinct elements problem by relying on randomization and can efficiently monitor a stream of elements without exceeding available memory.