I want to count number of words from a String using Shell.
Suppose the String is:
input=\"Count from this String\"
Here the delimit
I'll just chime in with a perl one-liner (avoiding 'useless use of echo'):
perl -lane 'print scalar(@F)' <<< $input