I have customized my article template to show the total number of comments after the title, but the number showed is wrong (it always shows "12 comments";) -
see https://accademiainfinita.it/blog/12-coscienza/1016-la-notte-buia-dell-anima, or any other article from the blog https://accademiainfinita.it/blog

Here is the code I am using

// call Komento comment model
$commentsModel = KT::model('Comments');
$commentCount = $commentsModel->getCount('com_content', $this->item->id);

<!-- Render Komento comments single article page -->
<i class="fa fa-fw fa-comments-o"></i> <a href="#comments"><span class="commentCounter" data-kt-counter><?php echo $commentCount; ?> </span><?php echo JText::_('COM_KOMENTO_COMMENTS'); ?></a>
<!-- Render Komento comments on single article page - end -->

this code in inserted in

which si called in

I attach both files for your reference

Thank you
Attachments (1)
Attachments can only be downloaded by logged in users

This section can only be seen by users with a valid subscription.
If you have a valid subscription, please login now

Support is

The support team is online and will be able to answer your inquiries. Please stay calm, follow the rules and do not cross post.

We will attend to you as soon as we can.

Your time
Stack Ideas time