how many courses have prerequisite?
select count ( * ) from course where course_id in ( select course_id from prereq )
how many courses are there?
select count ( * ) from course
How many courses that do not have prerequisite?
select count ( * ) from course where course_id not in ( select course_id from prereq )