I am already using this example of how to read large data files in PHP line by line
Now, what it'd like to do, is obtain the total number of rows in the file so that I may display a percentage complete or at least what the total number of rows are so I can provide some idea of how much processing is left to be done.
Is there a way to get the total number of rows without reading in the entire file twice? (once to count the rows and once to do the processing)