Add limit for n_jobs with a max of os.cpu_count()
#2940
Merged
n_jobs with a max of os.cpu_count()
#2940