---
title: "count(in:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/indexset/count(in:)-v622"
---

# count(in:)

Returns the count of integers in self that intersect range.

## Declaration

```swift
func count(in range: Range<IndexSet.Element>) -> Int
```
