This should give you distinct values counts:
select pdb_id,count(*) from chain where chain_id = 'A' group by pdb_id;
zhix.