def get_number_of_arrays(vtk_polydata):
    """Returns the names and number of arrays for a vtkPolyData object

    Args:
        vtk_polydata (vtkPolyData): object / line to investigate the array.

    Returns:
        count (int): Number of arrays in the line.
        names (list): A list of names of the arrays.
    """
    count = 0
    names = []
    name = 0
    while name is not None:
        name = vtk_polydata.GetPointData().GetArrayName(count)
        if name is not None:
            names.append(name)
            count += 1

    return count, names