Added freq_count function for problem 5.
Added max_values function for problem 5.
Added Factorization iterator to problem 5.
Optimized problem 5.