Emgu CV Library Documentation
cvCountNonZero Method (arr)
NamespacesEmgu.CVCvInvokecvCountNonZero(IntPtr)

www.emgu.com/wiki
Returns the number of non-zero elements in arr: result = sumI arr(I)!=0 In case of IplImage both ROI and COI are supported.
Declaration Syntax
C#Visual BasicVisual C++
public static int cvCountNonZero(
	IntPtr arr
)
Public Shared Function cvCountNonZero ( _
	arr As IntPtr _
) As Integer
public:
static int cvCountNonZero(
	IntPtr arr
)
Parameters
arr (IntPtr)
The image
Return Value
the number of non-zero elements in image

Assembly: Emgu.CV (Module: Emgu.CV) Version: 1.5.0.0 (1.5.0.0)