SELECT count(*) ,  T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid  =  T2.stuid GROUP BY T1.stuid
Find the number of pets for each student who has any pet and student id.
SELECT count ( * ) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid
select count ( * ) , t1 . stuid from student as t1 join has_pet as t2 on t1 . stuid = t2 . stuid group by t1 . stuid
Find the number of pets for each student who has any pet and student id .