$ perl -le 'print scalar @{[grep {-f} <./*.txt>]}' 1