fhand = open('mbox-short.txt') count = 0 for line in fhand: count = count + 1 print('Liczba linii:', count)