perl -e 'open(IN,"<", $ARGV[0]);$i=0;while(){$i++};print $i' in.file