> For the complete documentation index, see [llms.txt](https://shedmate.gitbook.io/shedmate-help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shedmate.gitbook.io/shedmate-help/setting-up-shedmate/costing-database-and-pricing-calculations/variables/mathematical-functions/countlistif.md).

# COUNTLISTIF

The COUNTLISTIF function in Shedmate counts the number of items in a list that meet a specific condition.

### Syntax:

```
COUNTLISTIF(Logical expression)
```

### Parameters:

```
Logical expression: Logical expression that will be validated to obtain the value.
```

### Usage examples:

Count how many front walls we have:

COUNTLISTIF(shedresult.walls.\*.wallidentifier="Front")

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfbtjFVuk8i3zFpBe7gw4P2gGGpM6yYfPlWmX4KzfH6a-xIS--D9FjRyWK5-nKVvOHj_Zwb79uVpudDYgmSxLr1o7rcDEYS8E68BNyARH3_BunPVnd18NHxUGYuaHaQdsfEIc3cbIT9fvl3UDGWkT2JrXw?key=XOC2SPeEfDJHl8uZwAWUcg" alt=""><figcaption></figcaption></figure>

Count how many rollerdoors are located in the front wall:

COUNTLISTIF (shedresult.rollerdoors.\*.wallidentifier="Front")

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcA_iO-mtRM709zlQoYwxjOIa6yeZVrPndqCl5gZCoh0RbL8ItQzXxHZGQqvk108IPixnM8qQGYuCvc4i6-eVVVk3-rek5KvbTGcCC72F73E8DW-nWsNCOtnTMqsURlVRfsbGaCgzMK14r_2C1Pgrs7D-IO?key=XOC2SPeEfDJHl8uZwAWUcg" alt=""><figcaption></figcaption></figure>

Count how many SERIES A rollerdoors are located in the front wall:

COUNTLISTIF(AND(shedresult.rollerdoors.\*.wallidentifier="Front",shedresult.rollerdoors.\*.seriesname="Series A"))

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdPBudnKsxcW_nocHTsSaoDyoY_MT7P11FDTHCI-cm0Xi6N41t3rMhUMsyvijppxCbF998VDJDT6SZlXwkhZ6L1uWr695vAetDMmKATx2jtQZYbR9IUt-1gygr_ZNLBb0oXf-0NTMyd3VHlWOqBO6SweGk?key=XOC2SPeEfDJHl8uZwAWUcg" alt=""><figcaption></figcaption></figure>
