<p>Yeah you should be able to do something like</p>

<p><code>{{ block.assetField|length }}</code></p>

CC BY-SA 3.0
2015-06-15T13:39:36.540Z
2015-06-15T13:39:36.540Z
Alec Ritson
<p>This is old but it looks like there was never an accepted answer. This seems to work for me.</p>
<pre><code>{% set count = block.carouselImages.count() %}
</code></pre>

CC BY-SA 4.0
2022-07-29T18:38:34.467Z
2022-07-29T18:38:34.467Z
Jason McKinney
<p>I have a matrix block which has an asset field inside of it. I want to know how many assets are inside the block, is there a way to do so?</p>

<assets><matrix>
How to find number of assets inside a matrix block?
# How to find number of assets inside a matrix block?

(Asked by: username_0 on 2015-06-15)

I have a matrix block which has an asset field inside of it. I want to know how many assets are inside the block, is there a way to do so?

**Tags:** assets, matrix


---

## 2 answers

### Answer by username_1 on 2015-06-15. Score: 3

Yeah you should be able to do something like

`{{ block.assetField|length }}`


---

### Answer by username_2 on 2022-07-29. Score: 1

This is old but it looks like there was never an accepted answer. This seems to work for me.
{% set count = block.carouselImages.count() %}


---

