Das läßt sich nur mittels normalem Select erledigen:

select count(*) into :mycount
from myfile
where .....

if mycount>*zero;
:
endif;