For performance reasons I removed the knockout functionality to get the total number of articles in my cart. By using the Magento\Checkout\Helper\Cart helper
On some pages the count of articles in my minicart is always 0. While on other pages (url.com/cart and url.com/contact) the count is showed correct.
Does somebody know what the problem is?
minicart.phtml
<?php
$cartHelper = $this->helper('Magento\Checkout\Helper\Cart');
?>
<span class="MiniCart-items counter-label">
<span class="u-inlineBlock u-alignMiddle u-marginRxs">
<?php echo $cartHelper->getItemsCount(); ?>
</span>
<span class="u-inlineBlock u-alignMiddle">
<?php if($cartHelper->getItemsCount() == 1): ?>
<?php /* @escapeNotVerified */ echo __('Artikel'); ?>
<?php else: ?>
<?php /* @escapeNotVerified */ echo __('Artikelen'); ?>
<?php endif; ?>
</span>
</span>