function complex( x, value ) {
	var view;
	var re;
	var im;
	var n;
	var i;

	if ( !isComplexLike( value ) ) {
		return 0;
	}
	re = real( value );
	im = imag( value );

	view = reinterpret( x, 0 );

	n = 0;
	for ( i = 0; i < view.length; i += 2 ) {
		if ( isSameValue( view[ i ], re ) && isSameValue( view[ i+1 ], im ) ) {
			n += 1;
		}
	}
	return n;
}
Counts the number of elements in a complex array that are equal to a specified value.

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

@example
var Complex128Array = require( '@stdlib/array/complex128' );
var Complex128 = require( '@stdlib/complex/float64/ctor' );

var x = new Complex128Array( [ 1.0, 2.0, 0.0, 0.0, 3.0, 4.0, 0.0, 0.0 ] );

var n = complex( x, new Complex128( 1.0, 2.0 ) );
// returns 1