Adding numpy count_nonzero & minor template fix

Have i missed something?
This only work if ``array`` is an ``ndarray``. numpy expression only implement ``begin()`` and ``end``, not ``fbegin`` and ``fend``. Have a look to ``numpy.sum`` !