def count_lines(file_name: str) -> int:
    """
    Counts the number of lines in a plain text file.
    :param file_name: File name.
    :return: The number of lines in the file.
    """
    with open(file_name) as f:
        i = 0
        for i, l in enumerate(f):
            pass
        return i + 1