remove count_nonzero