Numpy Array Get Number Of Distinct Sides