i tried with :
select count(agencia) from fotos WHERE AGENCIA='EFE' order by cod_doc desc;
and is better.
Thanks.