count number of elements are a value numpy code example Example: numpy count where print(np.sum(a % 2 == 1))