countzeros function

countzeros used in apply to count the number of zeros in a vector