Added num_factors.py for the session 7 task