Using python to count lines in a file



I am trying to use python to count the lines in a file. I have the following code.

fhand = open('test.txt')
count = 0 
for line in fhand:
    count = count + 1 

print 'Line Count'.count

However, when I run the file. I get the following response. What am I doing incorrectly?

<built-in method count of str object at 0x7fe53e4a7750>


Try this:

print 'Line Count: ', count


print 'Line Count: %s' % count


Thank you. The latter option worked!