To my knowledge, with a text file it is not possible to get the number of rows with actually reading the entire file because the file has no fixed format. In other words, you don't know how long any individual line is until you actually read that line.
It is possible however, if you know a typical, or average line length, to approximate the line count by using the LOF (length of file) function.
By dividing the results of the LOF by the typical line length (and I would add 1 more), you should have a reasonable estimate
of the number of lines. It won't always be exact, but it may very well suffice for a progress bar. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein