How do you count all the same items in the list?

How to count all identical elements in a list? example: list [3, 6, 11, 5, 3, 6, 5, 9, 5].
number 3 is repeated 2 times,
the number 6 is repeated 2 times,
the number 11 is repeated 1 time,
the number 5 is repeated 3 times,
number 3 is repeated 2 times,
the number 9 is repeated 1 time,

Thank you very much in advance!

This looks like a nice task for some homework... what have you tried?

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Tutorials for MIT App Inventor to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.


Build a dictionary from the list, with each item in the original list serving as a key, and its value initially 0. As you pass through the original list, add 1 to the dictionary value for the current item.

After the original list has been processed, the dictionary will have your results.

1 Like

Thank you. I will try =)

Thanks, I'll definitely look into this stuff