docs: protected long readTerminalCount(final BitInputStream in, final long size)
      throws IOException {
      if (SERIALIZATION_CHECKS) {
        in.expect(SerializationChecks.BeforeTerminal);
      }
      final long readBoundedLong = in.readBoundedLong(1 + size);
      if (SERIALIZATION_CHECKS) {
        in.expect(SerializationChecks.AfterTerminal);
      }
      return readBoundedLong;
    }