# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shedmate.gitbook.io/shedmate-help/setting-up-shedmate/costing-database-and-pricing-calculations/variables/mathematical-functions/countlistif.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
