private int countCardsInHand(BufferedImage image) {
		int y = handRow + 2;
		int cardCount = 0;
		boolean currentlyYellow = false;
		int stripeLength = 0;
		int gapLength = 0;
		for(int x = 391; x < 1100; ++x) {
			if(isSufficientlyYellow(image.getRGB(x, y))) {
				gapLength = 0;
				++stripeLength;
				if(!currentlyYellow) {
					currentlyYellow = true;
				}
			}
			else {
				if(currentlyYellow) {
					if(stripeLength > 1) {
						if(gapLength > 4) {
							cardCount++;
							logger.debug("Start: " + (x - stripeLength) + " Length: " + stripeLength);
							gapLength = 0;
							stripeLength = 0;
							currentlyYellow = false;
						}
						else {
							gapLength++;
						}
					}
				}
			}
		}
		
		logger.info("Card count: " + cardCount);
		return cardCount;
	}