tf.experimental.numpy.count_nonzero

TensorFlow variant of NumPy's count_nonzero.

Unsupported arguments: keepdims.

See the NumPy documentation for numpy.count_nonzero.