---
title: count
framework: xcuiautomation
role: symbol
role_heading: Instance Property
path: xcuiautomation/xcuielementquery/count
---

# count

Evaluates the query and returns the number of elements that match.

## Declaration

```swift
var count: Int { get }
```

## See Also

### Accessing matched elements

- [allElementsBoundByAccessibilityElement](xcuiautomation/xcuielementquery/allelementsboundbyaccessibilityelement.md)
- [allElementsBoundByIndex](xcuiautomation/xcuielementquery/allelementsboundbyindex.md)
- [element](xcuiautomation/xcuielementquery/element.md)
- [element(boundBy:)](xcuiautomation/xcuielementquery/element(boundby:).md)
- [element(matching:)](xcuiautomation/xcuielementquery/element(matching:).md)
- [element(matching:identifier:)](xcuiautomation/xcuielementquery/element(matching:identifier:).md)
- [subscript(_:)](xcuiautomation/xcuielementquery/subscript(_:).md)
- [element(at:)](xcuiautomation/xcuielementquery/element(at:).md)
