Adding numpy count_nonzero