I'm setting up a new Magento2 webshop and I want to make a custom cart count number that updates it's number with Ajax like the standard minicart count number.
I already got some code that displays the cart quantity but it doesn't update with Ajax. (Page needs to be refreshed before the user sees a change) The PHP below shows the cart quantity count:
$helper = $this->helper('\Magento\Checkout\Helper\Cart');
echo $helper->getSummaryCount();