On the number of distinct exponents in the prime factorization of an integer