# Updated version - v1/count-list-items

**URL:** <https://forum.finsweet.com/t/updated-version-v1-count-list-items/5941>\
**Category:** Attributes\
**Created:** [August 25, 2025, 1:03pm UTC](https://forum.finsweet.com/t/updated-version-v1-count-list-items/5941 "2025-08-25T13:03:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dennis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/dennis/32/3762_2.png) [@dennis](https://forum.finsweet.com/u/dennis)\
**Post date:** [August 25, 2025, 1:03pm UTC](https://forum.finsweet.com/t/updated-version-v1-count-list-items/5941/1 "2025-08-25T13:03:42Z")

</div>

is there also an updated version of count-list-items

> **[Count List Items - Count the number of items in a Webflow CMS Collection List](https://finsweet.com/attributes/v1/count-list-items#examples)**
>
> Count and display the number of items in a Webflow CMS Collection List

---

<div class="post-metadata">

**Author:** ![Support-Finn](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-finn/32/5169_2.png) [@Support-Finn](https://forum.finsweet.com/u/Support-Finn)\
**Post date:** [August 26, 2025, 5:03am UTC](https://forum.finsweet.com/t/updated-version-v1-count-list-items/5941/2 "2025-08-26T05:03:26Z")

</div>

Hey @dennis!

Based on our research, the count-list-items attribute is only available in Attributes v1 (Legacy) with no direct standalone equivalent in v2.

However, you can find similar counting functionality integrated within other v2 attributes:

- List Filter v2 includes `fs-list-element="results-count"` to show filtered results count
- List Load v2 offers multiple counting options like `fs-list-element="items-count"` for total collection items, `fs-list-element="visible-count"` for currently visible items, and range display options

Just remember that Attributes v1 and v2 can’t be used on the same page as they’re incompatible, so you’ll need to choose one version for your entire project.

If you need help implementing any of these solutions, @Support-Luis or @Support-Pedro can assist you further.

---

<div class="post-metadata">

**Author:** ![dennis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/dennis/32/3762_2.png) [@dennis](https://forum.finsweet.com/u/dennis)\
**Post date:** [August 26, 2025, 6:05am UTC](https://forum.finsweet.com/t/updated-version-v1-count-list-items/5941/3 "2025-08-26T06:05:09Z")

</div>

The thing is that i want to show the number of items in my nested list. and that does not seem to work, is that correct?

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [August 26, 2025, 3:24pm UTC](https://forum.finsweet.com/t/updated-version-v1-count-list-items/5941/4 "2025-08-26T15:24:36Z")

</div>

Hey @dennis! Could you share a read-only link? I’ll have a look at the setup and see the best approach for this 😉

---

<div class="post-metadata">

**Author:** ![dennis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/dennis/32/3762_2.png) [@dennis](https://forum.finsweet.com/u/dennis)\
**Post date:** [September 1, 2025, 11:58am UTC](https://forum.finsweet.com/t/updated-version-v1-count-list-items/5941/5 "2025-09-01T11:58:01Z")

</div>

## 

hi there, sorry for the delay, had a lot of work to do.

so you can see, each brand says, “4 compatible models”. that should become dynamic on the number of items int he nested list when filtered.

**Required:** Please provide a staging/production URL where we can see the issue

- URL: [staging](https://test-compatibility.webflow.io/) website

- Webflow Read-only link: **[Webflow Read-only link](https://preview.webflow.com/preview/test-compatibility?utm_medium=preview_link&utm_source=designer&utm_content=test-compatibility&preview=7013f868f1c49c0a544bf34508d3282e&locale=en&workflow=preview)**

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [September 3, 2025, 3:24pm UTC](https://forum.finsweet.com/t/updated-version-v1-count-list-items/5941/6 "2025-09-03T15:24:08Z")

</div>

Hey @dennis! I’m afraid there is no direct optionto achieve this within Attributes. However I have managed to get the item count working reliably with this code snippet using the List API.

```html
<script>
  window.FinsweetAttributes = window.FinsweetAttributes || [];
  window.FinsweetAttributes.push([
    'list',
    async (listInstances) => {
      console.log('List Successfully loaded!');

      const [listInstance] = listInstances;
      const items = listInstance.items.value;

      async function processItem(item) {
        try {
          await item.nesting;
          const { element } = item;
          const numberCountElement = element.querySelector('[data-count="item-count"]');
          const nestedList = element.querySelector('[fs-list-element="list"]');
          const nestedItems = nestedList ? nestedList.children.length : 0;

          if (numberCountElement) {
            numberCountElement.textContent = nestedItems;
          }
        } catch (error) {
          console.error('Error resolving nesting for item:', error);
        }
      }

      await Promise.all(items.map(processItem));
    },
  ]);
</script>

```

We wait for all items to be nested, and the we simply count the children element for the list. The only required modification to your setup is separating the text block that will show the item count and add the attribute `data-count="item-count"` to it.

Final layout should look like this

```html
<div class="brand-content">
  <div class="compatibility_list_brand">Alfen</div>
  <div class="text-block-131" data-count="item-count">4</div>
  <div class="text-block-131">compatible models</div>
</div>

```
