# How to count how many times a value is in an array

**URL:** https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723
**Category:** Ask for Help
**Created:** [January 26, 2022, 2:22pm UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723 "2022-01-26T14:22:25Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![VadymBohdan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vadymbohdan/32/21195_2.png) [@VadymBohdan](https://community.glideapps.com/u/VadymBohdan)
#### Post date: [January 26, 2022, 2:22pm UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/1 "2022-01-26T14:22:25Z")

</div>

Hi Everyone.  
How to count how many times a column value is contained in the corresponding row of an array?

I found several similar requests from other users in the search, but they remained without any reasonable answer.  
Maybe someone already came up with an elegant solution for this?

 ![Glide_Array](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/f/3f100fd18c3f8fb7e8b9d35c07dc2ce33f96114f.jpeg)

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [January 26, 2022, 11:35pm UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/2 "2022-01-26T23:35:53Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/9/2942adad0557300aab79bb6c87078d6392393f99.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/b/ab0bfbeec3955599dd64a942bb2c1c3fd52886c0.png)

You can use my link in an Experimental Code column.

[https://thinhdinhlca.github.io/count-occurrences-in-array/](https://thinhdinhlca.github.io/count-occurrences-in-array/)

The source code:

> **[GitHub - thinhdinhlca/count-occurrences-in-array](https://github.com/thinhdinhlca/count-occurrences-in-array)**
>
> Contribute to thinhdinhlca/count-occurrences-in-array development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![VadymBohdan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vadymbohdan/32/21195_2.png) [@VadymBohdan](https://community.glideapps.com/u/VadymBohdan)
#### Post date: [January 27, 2022, 8:50am UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/3 "2022-01-27T08:50:29Z")

</div>

> [@ThinhDinh](#):
>
> You can use my link in an Experimental Code column.

Damn it! This works great!!  
Thank you very much!

I hope the Glide staff will someday add this feature to working with arrays…

---

<div class="post-metadata">

### Author: ![VadymBohdan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vadymbohdan/32/21195_2.png) [@VadymBohdan](https://community.glideapps.com/u/VadymBohdan)
#### Post date: [January 27, 2022, 9:02am UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/4 "2022-01-27T09:02:52Z")

</div>

> [@ThinhDinh](#):
>
> You can use my link in an Experimental Code column.

I hope you won’t be making any changes to this Experimental code anytime soon, as I’m already using it in the app 😀

Also, I will be glad if you can be trusted, because I have already chosen “I Understand” 🤝)))  
 ![Glide_Warning](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/b/5ba4cee5367cb6a62ccf510f08c362ef76072ec6.jpeg)

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [January 27, 2022, 9:14am UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/5 "2022-01-27T09:14:31Z")

</div>

I have no doubt that Thinh can be trusted 😉

That notwithstanding, I would always recommend cloning his repository and publishing under your own GitHub account. Then you have control.

---

<div class="post-metadata">

### Author: ![VadymBohdan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vadymbohdan/32/21195_2.png) [@VadymBohdan](https://community.glideapps.com/u/VadymBohdan)
#### Post date: [January 27, 2022, 9:18am UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/6 "2022-01-27T09:18:04Z")

</div>

> [@Darren\_Murphy](#):
>
> I would always recommend cloning his repository and publishing under your own GitHub account

This is a very good idea. Where can you read about it? I didn’t see this information in the Documentation.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [January 27, 2022, 9:21am UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/7 "2022-01-27T09:21:37Z")

</div>

This is a GitHub thing, so you won’t see anything about it in the Glide Documentation.  
I gave a rough guide in the below thread, you should be able to follow it:

> [@Calendar reminder](https://community.glideapps.com/t/calendar-reminder/30901/20):
>
> haha, I’ve been a Github user for many years, so wasn’t really comfortable using replit. To get these YC columns up and running using Github: Sign up for a Github account Clone the repo Publish it as a “page” To do that last step, you need to navigate to the repo, then go to Settings → Pages Everything you need to know about Github Pages:

---

<div class="post-metadata">

### Author: ![VadymBohdan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/vadymbohdan/32/21195_2.png) [@VadymBohdan](https://community.glideapps.com/u/VadymBohdan)
#### Post date: [January 27, 2022, 9:25am UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/8 "2022-01-27T09:25:12Z")

</div>

Thanks!

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [January 27, 2022, 11:36pm UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/9 "2022-01-27T23:36:01Z")

</div>

I went to Github instead of continuing with Replit all based on Darren’s recommendation and guides. And yes, I won’t be changing that code since I’m using it in some apps as well!

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [January 28, 2022, 11:36pm UTC](https://community.glideapps.com/t/how-to-count-how-many-times-a-value-is-in-an-array/37723/10 "2022-01-28T23:36:59Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
