With Power Apps studio 3.23051 version a new AllItemsCount property added to Gallery control.
As per the documentation, Usage of AllItemsCount performance is much faster than calling CountRows function over AllItems.
Using CountRows function:
- To use CountRows function, you need to pass ‘AllItems’ property of Gallery as a parameter.

Using AllItemsCount property:
- AllItemsCount is a property of Gallery control and can be referred as below.

🙂

![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)

Leave a comment