The smallest prime factor is $2$, and thus, a number like $n = 2^m$ has $m$ prime factors, all of which are $2$. If a number $n$ had a $m$ prime factors and at least one was greater than $2$, then $n \ge 3 \cdot 2^{m - 1} > 2^m$. Therefore, the maximum number of prime factors cannot be greater than $m$, so the maximum number of prime factors is $\left\lfloor \log_2(n) \right\rfloor$.
For example, the maximum number of prime factors of one million is $19$.