Show a sequence of distinct Primes number is O(log n)
Since each of the prime numbers is at least 2, we have
$$n \geq \prod_{i=1}^{r(n)} p_i \geq \prod_{i=1}^{r(n)} 2 = 2^{r(n)}, $$
from which it follows that $r(n) \leq \log_2 n$.

In fact, since the prime numbers are generally larger than 2, we can obtain a better bound, namely $$ r(n) \lesssim \frac{\log n}{\log \log n}. $$
See for example MathWorld, which states the number of distinct prime factors in a primorial.