Count lines in a text file

(imported topic written by RosaMartin)

how would I go about counting the number of lines in a text file?

(imported comment written by jessewk)

number of lines of file “c:\foo.txt”

(imported comment written by RosaMartin)

Thanks - that worked well.