How to measure/calculate the total number of elements using count elements

I am testing a mobile app in that I want to make sure and count the number of elements present on the screen and tried a lot to get the total elements to count but facing the issue…
Please tell me how to pass the values of bytype, bystring, and visible only

Is there any other way to solve it…

In ByType : You need to specify like ‘ID’ or ‘XPATH’ or ‘NAME’.
In ByString:You need to specify the id of the element if you specified ‘ID’ in ‘ByType’ or the XPATH of the element if you specified ‘XPATH’ in ‘ByType’. Example: