How do I display only the number currently in cart?
<p>I am trying to display the number of items currently in my cart, however not getting any result. In Magento 1 we just just add the following to our phtml file and it will just echo the no. of items in cart.</p>
<pre><code>Mage::getModel(‘checkout/cart’)-&gt;getQuote()-&gt;getItemsCount();
</code></pre>
<p>This of course does not work in in Magento 2 (version 2.0.2). Within my custom HTML file. I just need to &quot;echo&quot; just the number, just like you get when get a number on the mini cart.</p>
<p>This is the section of code I need to put it in:</p>
<pre class="lang-html prettyprint-override"><code>&lt;span class=&quot;cart-text&quot;&gt;&lt;strong&gt;Basket:&lt;/strong&gt;
    &lt;span class=&quot;cart-count&quot;&gt;??????&lt;/span&gt; item(s)
&lt;/span&gt;
</code></pre>
<p>I need to put the number in replace of the question marks.</p>