jodd-servlet/src/main/java/jodd/servlet/tag/IteratorTag.java
protected int calculateTo(final int from, final int count, final int size) {
		int to = size;
		if (count != -1) {
			to = from + count;
			if (to > size) {
				to = size;
			}
		}
		return to;
	}
protected int calculateTo(final int from, final int count, final int size) {
		int to = size;
		if (count != -1) {
			to = from + count;
			if (to > size) {
				to = size;
			}
		}
		return to;
	}
Calculates 'TO'.