I think something like this will do :
Select T.id, ISNULL(dta.TA, 0) as TA, ISNULL(dtb.TB, 0) as TB from table1 T left outer join
(Select ida, count(*) as TA from table1A group by ida) dta
on T.id = dta.ida left outer join
(Select idb, count(*) as TB from table1B group by idb) dtb
on T.id = dtb.idb