Numpy Array Count Unique Values With Conditions Treated With Ivig