def _count_complex_poles(plant):
    """Returns number of complex poles in a transfer function"""
    n_complex_pole = 0
    for p in plant.pole():
        if p.imag != 0:
            n_complex_pole += 1
    return n_complex_pole