function accessors( x ) {
	var get;
	var n;
	var i;

	get = resolveGetter( x );

	n = 0;
	for ( i = 0; i < x.length; i++ ) {
		if ( get( x, i ) ) {
			n += 1;
		}
	}
	return n;
}
Counts the number of truthy values in an accessor array.

@private
@param {Collection} x - input array
@returns {NonNegativeInteger} number of truthy values

@example
var toAccessorArray = require( '@stdlib/array/base/to-accessor-array' );

var x = toAccessorArray( [ 0, 1, 0, 1 ] );

var n = accessors( x );
// returns 2