Then every int in your array was equal to 0, what behaviour were you expecting?
edit: Ah, sorry you wanted to know how many were equal to zero? Then just increment an int by 1 for each that is true, and set it: