---
title: count
framework: swift
role: symbol
role_heading: Instance Property
path: swift/span/count
---

# count

The number of elements in the span.

## Declaration

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

## Discussion

Discussion To check whether the span is empty, use its isEmpty property instead of comparing count to zero. note: O(1)
