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

It is currently off working hours and most of us aren't around.

Rest assured that we will get back to your issues as soon as the day starts tomorrow!

Your time
Stack Ideas time