Yes, $lines(myfile.txt) will return the number of lines.