codice:
select count(*) from(
select comuni.id, comuni.item from comuni where comuni.id=1
union
select comuni.id, comuni.item from comuni where comuni.id=2
union
select comuni.id, comuni.item from comuni where comuni.id=3
union
select comuni.id, comuni.item from comuni where comuni.id<5
)
nel tuo caso:
codice:
select id_tb1 as id ,nome,cognome from tb1
union
select id_tb2 as id ,nome,cognome from tb2
union
select id_tb3 as id ,nome,cognome from tb3
ricordati che la union ti restituisce solo righe diverse tra loro.
ciao