# Counting records in a collection

**URL:** <https://forum.adalo.com/t/counting-records-in-a-collection/21888>\
**Category:** Database\
**Created:** [January 11, 2022, 3:30am UTC](https://forum.adalo.com/t/counting-records-in-a-collection/21888 "2022-01-11T03:30:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alanb](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alanb](https://forum.adalo.com/u/alanb)\
**Post date:** [January 11, 2022, 3:30am UTC](https://forum.adalo.com/t/counting-records-in-a-collection/21888/1 "2022-01-11T03:30:27Z")

</div>

How can I easily count the records in a collection?

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 11, 2022, 3:43am UTC](https://forum.adalo.com/t/counting-records-in-a-collection/21888/2 "2022-01-11T03:43:08Z")

</div>

Hi @alanb ,

Welcome to the community 🥳

You can see next the to the collection name.

![image](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/8/86dda51ce70ae86a5dec153f7c6c0d1c6ccd4d19.png)

Thank you

---

<div class="post-metadata">

**Author:** ![alanb](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alanb](https://forum.adalo.com/u/alanb)\
**Post date:** [January 11, 2022, 4:05am UTC](https://forum.adalo.com/t/counting-records-in-a-collection/21888/3 "2022-01-11T04:05:53Z")

</div>

Sorry, I should have been more specific. How can I do this programmatically?  
eg. I want to count the number of todos that have been completed…I know when the completed button on an item has been pressed and can trigger an action to count these. But how can I do this?  
Thanks for early reply

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 11, 2022, 4:31am UTC](https://forum.adalo.com/t/counting-records-in-a-collection/21888/4 "2022-01-11T04:31:03Z")

</div>

I don’t think there’s a way to count it on the Database. But you can display the count in your app. You can add a text component and add Logged in user’s \> Tasks ( Relationship name) Count from magic text and add a filter to the count that Completed true/false property is true.

If you want to see the completed ones only from every users then you can add a text component and add Tasks ( Collection Name) Count from magic text and add a filter to the count completed true/false property is true.

And Your Welcome!

---

<div class="post-metadata">

**Author:** ![alanb](https://avatars.discourse-cdn.com/v4/letter/a/5f9b8f/32.png) [@alanb](https://forum.adalo.com/u/alanb)\
**Post date:** [January 11, 2022, 6:00am UTC](https://forum.adalo.com/t/counting-records-in-a-collection/21888/5 "2022-01-11T06:00:55Z")

</div>

That’s great, have managed to do it OK  
Many thanks

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 11, 2022, 6:20am UTC](https://forum.adalo.com/t/counting-records-in-a-collection/21888/6 "2022-01-11T06:20:35Z")

</div>

Great and Your Welcome!
