$ perl -n -e 'print, $count++ while /\bhello\b/g; END { print $count }' text.out