function countIf( x, predicate, thisArg ) {
	if ( isAccessorArray( x ) ) {
		return accessors( x, predicate, thisArg );
	}
	return indexed( x, predicate, thisArg );
}
Counts the number of elements in an array which pass a test implemented by a predicate function.

@param {Collection} x - input array
@param {Function} predicate - predicate function
@param {*} [thisArg] - predicate function evaluation context
@returns {NonNegativeInteger} result

@example
function predicate( value ) {
    return ( value > 0 );
}

var x = [ 0, 1, 0, 1, 1 ];

var n = countIf( x, predicate );
// returns 3