---
title: count()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/result/publisher-swift.struct/count()
---

# count()

## Declaration

```swift
func count() -> Result<Int, Failure>.Publisher
```
