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