function countSameValue( 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 [SameValue Algorithm][ecma-262-same-value-algorithm], as specified in ECMAScript 5.
-   In contrast to the strict equality operator `===`, `-0` and `+0` are distinguishable and `NaNs` are the same.

[ecma-262-same-value-algorithm]: http://ecma-international.org/ecma-262/5.1/#sec-9.12

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

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

var n = countSameValue( x, 1 );
// returns 3