select count(*) as ro_id_rows,count(select or_detail_status from tb_order_detail where or_id = = 'or1209260857252500900021' and or_detail_status = 'S') as detail_status from tb_order_detail where or_id = 'or1209260857252500900021'
select count(*) as ro_id_rows,(select count(or_detail_status) from tb_order_detail as tb_1 where or_id = 'or1209260857252500900021' and or_detail_status = 'S') as detail_status
from tb_order_detail as tb_2 where or_id = 'or1209260857252500900021'
credit:http://www.worldit2007.com/board/index.php?topic=1177.0 and http://dev.mysql.com/tech-resources/articles/subqueries_part_1.html