# "Count with" is not working as i expected

**URL:** <https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [August 1, 2021, 4:04pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726 "2021-08-01T16:04:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [August 1, 2021, 4:04pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/1 "2021-08-01T16:04:51Z")

</div>

Hello thunkers.  
Im stucked in s very simple problem, and i really dont know what i do wrong. Maybe im just too tired and i dont see the issue:

 ![screen](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/6/c6b1968600368aef3a43083df72d0c6ff6319728.png)  
It supposed to show: 1,1, then 1.2, then 1,3 … 2.1, then 2.2 and so on…  
All is showing is 0.0 and i dont see the problem 🤔

---

<div class="post-metadata">

**Author:** ![jonathonschnoor6x4b5](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jonathonschnoor6x4b5/32/112262_2.png) [@jonathonschnoor6x4b5](https://community.thunkable.com/u/jonathonschnoor6x4b5)\
**Post date:** [August 1, 2021, 4:37pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/2 "2021-08-01T16:37:30Z")

</div>

I would just have it repeat 10 times to wait 1 second then change the value by 1.

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [August 1, 2021, 4:49pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/3 "2021-08-01T16:49:02Z")

</div>

Its only a simplified example of what i need. I can remove label and wait blocks. The problem is that app stucked in the first loop, whitout any contor increase.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 1, 2021, 4:49pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/4 "2021-08-01T16:49:57Z")

</div>

The loop block does not know how to initialize **app wide variables**. Use the loop variables instead.

See this demonstration, @mimostel  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/c/fc612c5512b762fe4222234b75494f848c13a165.png)

Choose the option before last, **Rename variable…**

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/8/18ae2357bd40b345828f156c0896820f0891da96.png)

This will work  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/c/8c878eeb7884309306558073a41efc86cd9a8972.png)

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [August 1, 2021, 4:58pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/5 "2021-08-01T16:58:34Z")

</div>

ok, got this. thank you. but seems odd that cant use my vars 🤔 as long as i need more that just 1 for my 2 counts.  
And renaming “i” var will mess my code, renaming ALL "i"s if theres more in my blocks

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [August 1, 2021, 5:00pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/6 "2021-08-01T17:00:19Z")

</div>

i think ill just get rid of “count” and use a repeat while with contor inside instead.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 1, 2021, 5:02pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/7 "2021-08-01T17:02:32Z")

</div>

> [@mimostel](#):
>
> And renaming “i” var will mess my code, renaming ALL "i"s if theres more in my blocks

No, it shouldn’t do that. Whenever add a new loop block it will use the default “i” or “j” and even if it used your created variable then select the “i” or “j” then rename to whatever you want.

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [August 1, 2021, 5:13pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/8 "2021-08-01T17:13:11Z")

</div>

> [@muneer](#):
>
> No, it shouldn’t do that.

But it does… Just tested that

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 1, 2021, 5:38pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/9 "2021-08-01T17:38:08Z")

</div>

This onlly happens if you copy blocks. but if you add the blocks from the `Control` drawer then it will not happen.

![Loop-in-Loop](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b9b3c1218c22b9a2786ed81ce86cf6bb4ca04fe3.gif)

---

<div class="post-metadata">

**Author:** ![mimostel](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mimostel/32/107661_2.png) [@mimostel](https://community.thunkable.com/u/mimostel)\
**Post date:** [August 1, 2021, 8:31pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/10 "2021-08-01T20:31:48Z")

</div>

As usually, you are always my life saver in terms of Thunkable. Thank you very much !

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/count-with-is-not-working-as-i-expected/1424726/11 "2024-11-08T13:17:41Z")

</div>


