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

# count

The number of elements in the buffer.

## Declaration

```swift
let count: Int
```

## Discussion

Discussion If the baseAddress of this buffer is nil, the count is zero. However, a buffer can have a count of zero even with a non-nil base address.
