A more robust method of counting lines in a file.
First digit of the random number must never be zero.