def count_lines(filename):
    """ Counts the number of lines in the file.
	"""
    with open(filename, 'r') as fh:
        i = 0
        for i, _ in enumerate(fh, 1):
            pass
        return i
