in reply to Display Line Numbers

In addition to nl and other standard UNIX tools, here's a Perl one-liner:

perl -ne 'printf "%4d $_", $.'

For counting words, characters and lines there's also a standard tool called wc.