# CASE: when to use .size and .count to display the amount in a drop or variable?

**URL:** <https://community.silverfin.com/t/case-when-to-use-size-and-count-to-display-the-amount-in-a-drop-or-variable/793>\
**Category:** Cases\
**Tags:** drops, case\
**Created:** [April 3, 2018, 8:07am UTC](https://community.silverfin.com/t/case-when-to-use-size-and-count-to-display-the-amount-in-a-drop-or-variable/793 "2018-04-03T08:07:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [April 3, 2018, 8:07am UTC](https://community.silverfin.com/t/case-when-to-use-size-and-count-to-display-the-amount-in-a-drop-or-variable/793/1 "2018-04-03T08:07:46Z")

</div>

If you want to count how many elements a certain drop has, you can add `.count`to your drop-name or the name of a collection :

```auto

{{ period.directors.count }} 

```

Above code will result in the amount of directors have been checked in the `period.people` drop.

Same goes for an accounts\_var :

```auto

{% input custom.some.thing as:account_collection range:6,7 accounts_var:accounts %}

{{ accounts.count }} 

```

`{{ accounts.count }}` will display the amount of selected accounts in your custom collection (drop).

There are some variables however, that use `.size` to count the amount. For instance :

```auto

{{ period.calendar_years.size }}

```

will give the amount of calendar years a period has.

The difference when to use `.count` or `.size`⁉

`.count` can only be used in a drop or custom collection while the `.size` only for a variable (like `period.calendar_years.size` which is generated from the period-drop but not a drop itself).

Perhaps confusing, but worth to mention it in this case!
