select count(字段) from 表名 where 字段='A'
字段为A的条数。
select count(1),.... from table where ... group by ... order by ...