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

# count(in:)

Returns the count of integers in self that intersect range.

## Declaration

```swift
func count<R>(in range: R) -> Int where R : RangeExpression, R.Bound == Int
```
