diff --git a/src/Plugin/Preprocess/Field.php b/src/Plugin/Preprocess/Field.php
index 42cffb1c41bce73e1d108203d04810f64686ea99..1dd18bbfa023cf5444bc09650c51279d7065a672 100644
--- a/src/Plugin/Preprocess/Field.php
+++ b/src/Plugin/Preprocess/Field.php
@@ -70,7 +70,7 @@ class Field extends PreprocessBase {
       $node = !empty($attached['#object']) ? $attached['#object'] : NULL;
       // Count the amount of comments placed on a Node..
       if ($node instanceof Node) {
-        $comment_count = _socialbase_node_get_comment_count($node);
+        $comment_count = (int) $node->get($element['#field_name'])->comment_count;
         // Add it to the title.
         $variables['comment_count'] = $comment_count;

diff --git a/src/Plugin/Preprocess/Node.php b/src/Plugin/Preprocess/Node.php
index 659272f11d76ab772907b2cefef7baf5ddf34c9c..f8f5758a788025f79eac839b43141296d8fbc1ef 100644
--- a/src/Plugin/Preprocess/Node.php
+++ b/src/Plugin/Preprocess/Node.php
@@ -173,7 +173,7 @@ class Node extends PreprocessBase {
       // OPEN or CLOSED we can render icon for
       // comment count, and add the comment count to the node.
       if ($node->$comment_field_name->status != CommentItemInterface::HIDDEN) {
-        $comment_count = _socialbase_node_get_comment_count($node);
+        $comment_count = (int) $node->get($comment_field_name)->comment_count;
         $variables['below_content'][$comment_field_name]['#title'] = $comment_count === 0 ? t('Be the first one to comment') : t('Comments');

         // If it's closed, we only show the comment section when there are
