public Result<Integer> getItemCount(int namespace, Serializable key) {
		if ((namespace < 0) || (namespace > TairConstant.NAMESPACE_MAX)) {
			return new Result<Integer>(ResultCode.NSERROR);
		}
		RequestGetItemsCountPacket packet = new RequestGetItemsCountPacket(transcoder);

		packet.setNamespace((short) namespace);
		packet.addKey(key);

		int ec = packet.encode();

		if (ec == 1) {
			return new Result<Integer>(ResultCode.KEYTOLARGE);
		} else if (ec == 2) {
			return new Result<Integer>(ResultCode.VALUETOLARGE);
		}

		ResultCode rc = ResultCode.SUCCESS;
		BasePacket returnPacket = sendRequest(key, packet);
		
		int count = 0;
		if ((returnPacket != null) && returnPacket instanceof ReturnPacket) {
			ReturnPacket r = (ReturnPacket) returnPacket;
			
			count = ((ReturnPacket) returnPacket).getCode();
			if (count < 0)
				rc = ResultCode.valueOf(count);

			configServer.checkConfigVersion(r.getConfigVersion());
		}

		return new Result<Integer>(rc, count);
	}