def file_len(fname):
    """
    Get the number of lines in a text file. This is used to count the number of NE found by gamebit.
    :param fname: file name.
    :return: number of lines.
    """
    num_lines = sum(1 for line in open(fname))
    return num_lines