Numpy Array Count Unique Values With Conditions