Appium iOS: How can I count the number of elements on screen

appium iOS: How can I count the number of elements on screen

For eg., I have 2 label with text Price on screen then I want to be able to count label with text ‘Price’ which should result in 2.

Another thing I want is to count all UIAStaticText on screen,how I can I do so?

calabash had query(“UIAStaticText”).count,I want something similar

you can do a .size and put that in a string