static appendLengthInfo(numLetters /*int*/, version, mode, bits) {
			const numBits = mode.getCharacterCountBits(version);
			if (numLetters >= (1 << numBits)) {
				throw new WriterException(numLetters + ' is bigger than ' + ((1 << numBits) - 1));
			}
			bits.appendBits(numLetters, numBits);
		}
Append length info. On success, store the result in "bits".