import csv


def get_width(input_path, is_labelled, delimiter="\t"):
    """
    Assume the number of elements in the first row is the total width.
    """
    with open(input_path, "r", newline="") as input_handle:
        reader = csv.reader(input_handle, delimiter=delimiter)
        len_row = len(next(reader))
        if is_labelled:
            return len_row - 1
        return len_row