---
title: totalSwimmingStrokeCount
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkworkout/totalswimmingstrokecount
---

# totalSwimmingStrokeCount

The total stroke count for the workout.

## Declaration

```swift
var totalSwimmingStrokeCount: HKQuantity? { get }
```

## Discussion

Discussion This property contains a quantity using count units, or nil. note: Provide a total stroke count value whenever the stroke count is relevant to the workout type. In addition, add stroke count samples to a workout using the add(_:to:completion:) method. These samples should sum up to the total stroke count, while providing detailed information about how the intensity changes over the duration of the workout.

## See Also

### Accessing workout data

- [duration](healthkit/hkworkout/duration.md)
- [workoutActivityType](healthkit/hkworkout/workoutactivitytype.md)
- [workoutActivities](healthkit/hkworkout/workoutactivities.md)
- [workoutEvents](healthkit/hkworkout/workoutevents.md)
- [statistics(for:)](healthkit/hkworkout/statistics(for:).md)
- [allStatistics](healthkit/hkworkout/allstatistics.md)
- [totalDistance](healthkit/hkworkout/totaldistance.md)
- [totalEnergyBurned](healthkit/hkworkout/totalenergyburned.md)
- [totalFlightsClimbed](healthkit/hkworkout/totalflightsclimbed.md)
