$ perl -ne 'BEGIN {print scalar <>} print if eof' /path/to/your/file