shell count number of lines

Shell
$ wc -l < /dir/file.txt
3272485
Source

Also in Shell: