SELECT COUNT(*) FROM `table_1` WHERE `id`='7'
SELECT COUNT(*) FROM `table_2` WHERE `id`='7'
SELECT COUNT(*) as t1_count, NULL FROM `table_1` WHERE `id`='7'
UNION
SELECT NULL, COUNT(*) as t2_count FROM `table_2` WHERE `id`='7'
select
COUNT(*) as t1_count,
t2.t2_count
FROM `table_1` t1
inner join
(
SELECT id, COUNT(*) as t2_count FROM `table_2` WHERE `id`='7'
) t2 on t2.id = t1.id
where t1.id = '7'