code: public static String repeatedGetCountMethodName(Field field) {
          if (field.isRepeated()) {
              return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + "Count";
          }
          throw new IllegalArgumentException(field.toString());
      }
docs: Returns a element count getter name for proto repeated field.