public TranslationManager::formatPlural($count, $singular, $plural, array $args = array(), array $options = array())
Formats a string containing a count of items.
This function ensures that the string is pluralized correctly. Since TranslationInterface::translate() is called by this function, make sure not to pass already-localized strings to it. See PluralTranslatableMarkup::createFromTranslatedString() for that.
For example:
$output = $string_translation->formatPlural($node->comment_c