Write SQL query to solve given problem: How many students that are undergoing the pre-phase of qualification have advisors?. Keep the solution inside sql tag ```sql [SQL-Query] ```
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