Token for Total Flag Count I have created a flag for my comments named HELPFUL. If users find a comment helpful they vote it as such. 

The challenge that I have is how do I show the total votes for the flag next to the button? If a comment was voted as helpful 5 times for example, show that next to the helpful button. 

If there are no helpful votes for a particular comment show nothing (do not display 0) but only the HELPFUL rate button (flag)

I have tried to add [flag-action:count] and [flag-helpful-count] as the token under the flag setting (/admin/structure/flags/manage/helpful >>edit>> Flag link text) but it does not work. 

Looked at COMMENT tokes and I see this available: [comment:flag-helpful-count]
It still won't work. It shows this text [comment:flag-helpful-count] instead of a total number. 

Any help would be greatly appreciated.
You try code:

/**
 * Implements hook_tokens().
 */
function mymodule_tokens($type, $tokens, array $data, array $options, \Drupal\Core\Render\BubbleableMetadata $bubbleable_metadata) {
  $replacements = array();
  if($type == 'comment' &amp;&amp; !empty($data['comment'])) {

    foreach($tokens as $name =&gt; $original) {
      switch($name) {
        case 'flag-helpful-count':
          //$comment = \Drupal\comment\Entity\Comment::load($data['comment']-&gt;get('cid')-&gt;value);
          //$count_flag = \Drupal::service('flag.count')-&gt;getEntityFlagCounts($comment);
          $replacements[$original] = 10;
          break;
      }
    }
  }
  return $replacements;
}

function mymodule_preprocess_comment(&amp;$variables) {
  $token_service = \Drupal::token();
  $token_count_flag = $token_service-&gt;replace('[comment:flag-helpful-count]', array('comment' =&gt;
    $variables['elements']['#entity']));

}