<p>From the <a href="https://squarebit.co.uk/software/craft/shortlist/usage/variables#itemCount" rel="nofollow noreferrer">documentation</a> is looks like the correct syntax to use is:</p>

<pre><code>{{ craft.shortlist.itemCount }}
</code></pre>

CC BY-SA 3.0
2016-11-28T00:17:07.683Z
2016-11-28T00:17:07.683Z
Brad Bell
<p>I am using the <a href="https://squarebit.co.uk/software/craft/shortlist" rel="nofollow noreferrer">Shortlist</a> plugin as a rating system throughout the site and need to display the numeral for the total, with a very simple conditional.</p>

<pre><code>{% set item = craft.shortlist.item('favourites') %}

{% if craft.shortlist.itemCount &gt; 0 %}
    **{{ number }}**&lt;i class="fa fa-large fa-heartbeat"&gt;
{% else %}
    &lt;i class="fa fa-large fa-heart-o"&gt;
{% endif %}
</code></pre>

<p>I have tried <code>{{ item }}</code>, <code>{{ count }}</code>, <code>{{ itemCount }}</code>, but am unable to display a numeral.</p>

<p>Any suggestions?</p>

CC BY-SA 3.0
2016-11-27T21:45:22.280Z
Never used the plugin before, but it looks like `itemCount` is the thing to use, but it was added in v1.1. Are you running that version? https://squarebit.co.uk/software/craft/shortlist/usage/variables
Brad Bell
CC BY-SA 3.0
2016-11-28T00:00:59.603Z
Thanks Brad, yes I am running v1.1.0 and {{ itemCount }} triggers; "Variable "itemCount" does not exist".
Nutmeg
CC BY-SA 3.0
2016-11-28T00:03:44.640Z
Oh... looks like it's `craft.shortlist.itemCount` https://squarebit.co.uk/software/craft/shortlist/usage/variables#itemCount
Brad Bell
CC BY-SA 3.0
2016-11-28T00:12:09.943Z
Brilliant Brad, still getting used to reading/understanding the Craft lingo..
Nutmeg
CC BY-SA 3.0
2016-11-28T00:16:27.310Z
Awesome... will go ahead and add that as an official answer.
Brad Bell
<plugin-shortlist>
How to display itemCount using the Shortlist plugin?
# How to display itemCount using the Shortlist plugin?

(Asked by: username_0 on 2016-11-27)

I am using the Shortlist plugin as a rating system throughout the site and need to display the numeral for the total, with a very simple conditional.
{% set item = craft.shortlist.item('favourites') %}

{% if craft.shortlist.itemCount > 0 %}
    **{{ number }}**
{% else %}
    
{% endif %}

I have tried {{ item }}, {{ count }}, {{ itemCount }}, but am unable to display a numeral.
Any suggestions?

**Tags:** plugin-shortlist

> **Comments:**
> **username_1**: Never used the plugin before, but it looks like `itemCount` is the thing to use, but it was added in v1.1. Are you running that version? https://squarebit.co.uk/software/craft/shortlist/usage/variables  
> **username_0**: Thanks Brad, yes I am running v1.1.0 and {{ itemCount }} triggers; "Variable "itemCount" does not exist".  
> **username_1**: Oh... looks like it's `craft.shortlist.itemCount` https://squarebit.co.uk/software/craft/shortlist/usage/variables#itemCount  
> **username_0**: Brilliant Brad, still getting used to reading/understanding the Craft lingo..  
> **username_1**: Awesome... will go ahead and add that as an official answer.  

---

## 1 answers

### Answer by username_1 on 2016-11-28. Score: 1 | Accepted answer

From the documentation is looks like the correct syntax to use is:
{{ craft.shortlist.itemCount }}


---

