public int getContentsCount() {
    return contents_.size();
  }
<pre>
Required. The content of the input in string format.
We recommend the total content be less than 30k codepoints. The max length
of this field is 1024.
Use BatchTranslateText for larger text.
</pre>

<code>repeated string contents = 1 [(.google.api.field_behavior) = REQUIRED];</code>

@return The count of contents.
java-translate/proto-google-cloud-translate-v3beta1/src/main/java/com/google/cloud/translate/v3beta1/TranslateTextRequest.java