function nonsingletonDimensions( shape ) {
	var cnt;
	var i;

	cnt = 0;
	for ( i = 0; i < shape.length; i++ ) {
		if ( shape[ i ] !== 1 ) {
			cnt += 1;
		}
	}
	return cnt;
}
Returns the number of non-singleton dimensions.

## Notes

-   A singleton dimension is a dimension whose size is equal to `1`.

@param {NonNegativeIntegerArray} shape - array shape
@returns {NonNegativeInteger} number of non-singleton dimensions

@example
var shape = [ 2, 2, 1 ];

var n = nonsingletonDimensions( shape );
// returns 2

@example
var shape = [ 1, 1, 1 ];

var n = nonsingletonDimensions( shape );
// returns 0