def simple_nb_column(afile, separator='\t'):
    """Count the maximum number of columns in a file.

    :param separator: the separator (default "	").
    :param afile: file name.

    :Example:

    >>> from pygtftk.utils import get_example_file
    >>> from pygtftk.utils import simple_nb_column
    >>> my_file = get_example_file(datasetname="simple", ext="gtf")
    >>> my_file_h = open(my_file[0], "r")
    >>> assert simple_nb_column(my_file_h) == 9

    """
    if afile.close:
        afile = open(afile.name, 'r')
    nb_field = 0
    for line in afile:
        cur_nb_field = len(line.split(separator))
        if cur_nb_field > nb_field:
            nb_field = cur_nb_field
    afile.close()
    return nb_field
