def bins(inp_region):
    """
    return number of time bins in input region; arg should be region in inp_list

    :param inp_region: an object with a 'tstarts' field (typically a row of the input file)
    :return: the number of intervals defined
    """

    # create list of tstarts associated with inp_region
    list_in_string = inp_region['tstarts'].split(",")

    return len(list_in_string)