Select2 jquery plugin show number of selected items in the result instead of tags
<p>I am using <strong>Select2 jQuery Plugin</strong>.</p>

<p><a href="https://select2.github.io/" rel="noreferrer">https://select2.github.io/</a> for reference</p>

<p>When I am using the multiple dropdown option. The result of selected items is shown as tags in a box but, I just want to show the number of items selected. </p>

<p>Is it possible with <strong>Select2 jQuery plugin</strong></p>

<p><strong>HTML</strong></p>

<pre><code>&lt;select multiple style="width:100%"&gt;
  &lt;option value="1"&gt;Name1&lt;/option&gt;
  &lt;option value="2"&gt;Name2&lt;/option&gt;
  &lt;option value="3"&gt;Name3&lt;/option&gt;
  &lt;option value="4"&gt;Name4&lt;/option&gt;
  &lt;option value="5"&gt;Name5&lt;/option&gt;
  &lt;option value="6"&gt;Name6&lt;/option&gt;
  &lt;option value="7"&gt;Name7&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p><strong>JS</strong></p>

<pre><code>$('select').select2();
</code></pre>

<p>I want output as below</p>

<p><a href="https://i.stack.imgur.com/bx6qe.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bx6qe.png" alt="enter image description here"></a></p>

<p>instead of tag like output.</p>

<p><strong><a href="https://jsfiddle.net/murli2308/402ejhoy/" rel="noreferrer">Example working Fiddle</a></strong></p>