Código SQL [-] select count(*) from (select distinct * from Tabla1 ...)
select count(*) from (select distinct * from Tabla1 ...)