Count the number of captains that have each rank.
select count(*), rank from captain group by rank