I need to write a function that counts the number of lines in an ordinary text file. How would i go about doing this?