Count the non-masked elements of the array along the given axis.
Parameters:
axis : int, optional
Axis along which to count the non-masked elements. If axis is None,
all the non masked elements are counted.
Returns:
result : MaskedArray
A masked array where the mask is True where all data are
masked. If axis is None, returns either a scalar ot the
masked singleton if all values are masked.