setSubjects function

Set the number of subjects.