I probably missed something but at first glance I would do...
Code:
select   cid         "Clones", 
         count(*)    "Genes"
from     thetablewhereyourddatais
group by cid
order by cid;