On exit, the value of
res [
]
is the number of true (non-zero) elements
src [
]
over allowed values of .
As implied by the replicated alignment of the result array, results are broadcast in the process dimension associated with dimension dim of the source array.