Returns the number of inputs for the given {@link Operator} type.<br>
Currently, it can be 0, 1, or 2.

@param contractType
the type of the Operator
@return the number of input contracts
975756
public static int getNumInputs(final Class<? extends Operator<?>> contractType) {

		if (GenericDataSourceBase.class.isAssignableFrom(contractType)) {
			return 0;
		}
		if (GenericDataSinkBase.class.isAssignableFrom(contractType)
			|| SingleInputOperator.class.isAssignableFrom(contractType)) {
			return 1;
		}
		if (DualInputOperator.class.isAssignableFrom(contractType)) {
			return 2;
		}
		throw new IllegalArgumentException("not supported");
	}
1115911
@SuppressWarnings({ "unchecked", "rawtypes" })
	public static Class<? extends Operator> getContractClass(final Class<?> stubClass) {
		if (stubClass == null) {
			return null;
		}
		final Class<?> contract = STUB_CONTRACTS.get(stubClass);
		if (contract != null) {
			return (Class<? extends Operator<?>>) contract;
		}
		Iterator<Entry<Class<?>, Class<? extends Operator>>> stubContracts = STUB_CONTRACTS.entrySet().iterator();
		while (stubContracts.hasNext()) {
			Map.Entry<Class<?>, Class<? extends Operator>> entry = stubContracts.next();
			if (entry.getKey().isAssignableFrom(stubClass)) {
				return entry.getValue();
			}
		}
		return null;

	}
888624
public int getCount(Class target)
    {
        PersistenceBroker broker = ((HasBroker) odmg.currentTransaction()).getBroker();
        int result = broker.getCount(new QueryByCriteria(target));
        return result;
    }
432340
private void checkSingleInputContract(SingleInputOperator<?, ?, ?> singleInputContract) {
		Operator<?> input = singleInputContract.getInput();
		// check if input exists
		if (input == null) {
			throw new MissingChildException();
		}
	}
102169
public int getCount(IESigType eSigType) {
        int result = 0;
        
        for (ESigItem item : items) {
            if (item.getESigType().equals(eSigType)) {
                result++;
            }
        }
        
        return result;
    }
1328440
public int getNumberOfPredecessors() {

		int numberOfPredecessors = 0;

		for (int i = 0; i < this.inputGates.length; ++i) {
			numberOfPredecessors += this.inputGates[i].getNumberOfEdges();
		}

		return numberOfPredecessors;
	}
782027
private static int checkTypeArguments(final String signature, int pos) {
        // TypeArguments:
        // < TypeArgument+ >

        pos = checkChar('<', signature, pos);
        pos = checkTypeArgument(signature, pos);
        while (getChar(signature, pos) != '>') {
            pos = checkTypeArgument(signature, pos);
        }
        return pos + 1;
    }
930065
public Long getCount(String type, Map<String, ?> terms) {
		if (terms == null) {
			return 0L;
		}
		MultivaluedMap<String, String> params = new MultivaluedHashMap<>();
		LinkedList<String> list = new LinkedList<>();
		for (Map.Entry<String, ? extends Object> term : terms.entrySet()) {
			String key = term.getKey();
			Object value = term.getValue();
			if (value != null) {
				list.add(key.concat(Config.SEPARATOR).concat(value.toString()));
			}
		}
		if (!terms.isEmpty()) {
			params.put("terms", list);
		}
		params.putSingle(Config._TYPE, type);
		params.putSingle("count", "true");
		Pager pager = new Pager();
		getItems(find("terms", params), pager);
		return pager.getCount();
	}
1305235
public static int lengthForDtype(DataType type) {
        switch (type) {
            case DOUBLE:
                return 8;
            case FLOAT:
                return 4;
            case INT:
                return 4;
            case HALF:
                return 2;
            case LONG:
                return 8;
            case COMPRESSED:
            default:
                throw new IllegalArgumentException("Illegal opType for length");

        }


    }
574380
public int numValues(String property) {
		int count = 0;
		if (has()) {
			TResult result = queryForValues(property);
			try {
				count = result.getCount();
			} finally {
				result.close();
			}
		}
		return count;
	}
389770
public static <T> SimpleOperation<T> operation(Class<? extends T> type, Operator operator,
            Expression<?>... args) {
        return simpleOperation(type, operator, args);

    }
1327092
public int getNumberOfSignaturesRequiredToSpend() {
        if (ScriptPattern.isSentToMultisig(this)) {
            // for N of M CHECKMULTISIG script we will need N signatures to spend
            ScriptChunk nChunk = chunks.get(0);
            return Script.decodeFromOpN(nChunk.opcode);
        } else if (ScriptPattern.isP2PKH(this) || ScriptPattern.isP2PK(this)) {
            // P2PKH and P2PK require single sig
            return 1;
        } else if (ScriptPattern.isP2SH(this)) {
            throw new IllegalStateException("For P2SH number of signatures depends on redeem script");
        } else {
            throw new IllegalStateException("Unsupported script type");
        }
    }
1252992
public List<Integer> findIntValues(JvmAnnotationTarget op, Class<? extends Annotation> annotationType) {
		final JvmAnnotationReference reference = this.lookup.findAnnotation(op, annotationType);
		if (reference != null) {
			return findIntValues(reference);
		}
		return null;
	}
132452
public int getOperationCount()
    {
        int count = _operations.size();
        if (_superClass != null)
            count += _superClass.getOperationCount();

        return count;
    }
1119827
public int getCount(Object o) {
    Integer count = (Integer) cset.get(o);   
    if ( count == null ) {
      return(0);
    }
    else {
      return(count.intValue());
    }
  }
1226651
public List<OkCoinFutureKline> getFutureKline(
      CurrencyPair currencyPair,
      OkCoinKlineType type,
      FuturesContract contractType,
      Integer size,
      Long since)
      throws IOException {
    List<Object[]> list =
        okCoin.getFutureKline(
            "1",
            OkCoinAdapters.adaptSymbol(currencyPair),
            type.getType(),
            contractType.getName(),
            size,
            since);
    List<OkCoinFutureKline> klineList = new ArrayList<>();
    list.stream().forEach(kline -> klineList.add(new OkCoinFutureKline(kline)));
    return klineList;
  }
1284721
public int getMessageCount(E_MessageType type) {
		if(this.messageHandlers.containsKey(type)){
			return this.messageHandlers.get(type).getCount();
		}
		return -1;
	}