select count(1) from ( select count(1) from A where id=01 union all select count(1) from B where id=02 union all select count(1) from C where id=03 )
select sum(num) from ( select count(1) as num from A where id=01 union all select count(1) as num from B where id=02 union all select count(1) as num from C where id=03 )
select count(1) from A where id=01
union all select count(1) from B where id=02
union all select count(1) from C where id=03
)
select count(1) as num from A where id=01
union all select count(1) as num from B where id=02
union all select count(1) as num from C where id=03
)