How many students that are undergoing the pre-phase of qualification have advisors?
students refers to student = 1 and ; undergoing the phase of pre-qualification refers to inPhase = 'Pre-Quals'; have advisors refers to advisedBy.p_id
SELECT COUNT(T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.inPhase = 'Pre_Quals' AND T2.student = 1
database name:db_id computer_student
course table course Cols: course id dtype integer, course level dtype text, 
person table person Cols: person ID dtype integer, professor dtype integer, student dtype integer, has position dtype text, in phase dtype text, years in program dtype text, 
advisedBy table advisedBy Cols: person id dtype integer, person id dummy dtype integer, 
taughtBy table taughtBy Cols: course ID dtype integer, person ID dtype integer, 
