how to count number of lines of text file using python