how many ships have more than one captain?
Select count ( * )  from  ( SELECT * FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id   =   t2.ship_id GROUP BY t2.ship_id HAVING count ( * )   >  1 ) 
ships have more than one captain refers to HAVING COUNT(*) > 1; counting the ships refers to COUNT(*);