Python Count Number Of Nonzero Elements In Array