---
title: resultCount
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsmetadataqueryresultgroup/resultcount
---

# resultCount

The number of results returned by the result group.

## Declaration

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

## Discussion

Discussion For performance reasons, you should use this property rather than checking the count property on results.

## See Also

### Getting Query Results

- [attribute](foundation/nsmetadataqueryresultgroup/attribute.md)
- [value](foundation/nsmetadataqueryresultgroup/value.md)
- [results](foundation/nsmetadataqueryresultgroup/results.md)
- [result(at:)](foundation/nsmetadataqueryresultgroup/result(at:).md)
- [subgroups](foundation/nsmetadataqueryresultgroup/subgroups.md)
