function countSameValueZero( x, value ) {
	if ( isAccessorArray( x, value ) ) {
		if ( isComplexTypedArray( x, value ) ) {
			return complex( x, value );
		}
		if ( isBooleanArray( x, value ) ) {
			return boolean( x, value );
		}
		return accessors( x, value );
	}
	return indexed( x, value );
}
Counts the number of elements in an array that are equal to a specified value.

## Notes

-   The function uses the SameValueZero Algorithm used by `TypedArray` and `ArrayBuffer` constructors, `Map` and `Set` operations, `String.prototype.includes`, and `Array.prototype.includes` since ES2016.
-   In contrast to an implementation based on the strict equality operator `===`, the function treats `NaNs` as the same value.

@param {Collection} x - input array
@param {*} value - search value
@returns {NonNegativeInteger} number of elements that are equal to a specified value

@example
var countSameValueZero = require( '@stdlib/array/base/count-same-value-zero' );

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

var n = countSameValueZero( x, 1 );
// returns 2