Código SQL [-]select count(distinct(idcabecera)) from lineasdetalle
select count(distinct(idcabecera)) from lineasdetalle