C # program for the above approach
using System ; class GFG { static int count ( int [ ] a ) { int counter = 0 ; for ( int i = 0 ; i < a . Length ; i ++ ) { if ( a [ i ] == 0 ) { counter ++ ; } } return counter ; }