---
title: maximumCount
framework: healthkit
role: symbol
role_heading: Type Property
path: healthkit/hkheartbeatseriesbuilder/maximumcount
---

# maximumCount

The maximum number of heartbeats you can add to the sample.

## Declaration

```swift
class var maximumCount: Int { get }
```

## Discussion

Discussion After reaching the maximum count, any attempt to call the addHeartbeatWithTimeInterval(sinceSeriesStartDate:precededByGap:completion:) method fails.

## See Also

### Creating a Heartbeat Series Builder

- [init(healthStore:device:start:)](healthkit/hkheartbeatseriesbuilder/init(healthstore:device:start:).md)
