in reply to Perl 'pipe' problem

If the file names don't have spaces or other metacharacters, you can use xargs (and then the command won't fail if there are too many files):
find blah blah blah | xargs grep orderNumber | wc -l # Update: # or even: find blah blah blah | xargs grep -c orderNumber | awk '{tot+=$1} END{print tot}'