可以通过联表查询实现:
SELECT tb_profession.*, COUNT(*) AS proCount
FROM tb_students
INNER JOIN tb_profession
ON tb_profession.id = tb_students.stuProfession
GROUP BY tb_profession.id