def how_many_iterations(x:int, y:int, iteration_count:int):
    """Count how many iterations it takes to establish that 
    a certain point c: x + iy is not part of the Mandelbrot set
    """
    
    z = complex(0, 0)
    c_pair = complex(x,y)
    c_values = []
    
    for iteration in range(iteration_count):
        z = (z * z) + (c_pair)
        #split z into real and imaginary parts
        #if the real part of z goes over 2, the point will diverge
        zR = z.real
        #at each iteration check if the point is diverging 
        if zR > 2:
            c_values.append(iteration)
            break
    else:
        c_values.append(0)
        #if zR reaches 2, break out of loop since it will diverge
    return c_values