<!--
{
  "availability" : [
    "iOS: 10.0.0 - 18.0.0",
    "iPadOS: 10.0.0 - 18.0.0",
    "macCatalyst: 13.0.0 - 18.0.0",
    "macOS: 13.0.0 - 15.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 3.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKWorkout/totalSwimmingStrokeCount",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKWorkout(py)totalSwimmingStrokeCount"
  },
  "title" : "totalSwimmingStrokeCount"
}
-->

# totalSwimmingStrokeCount

The total stroke count for the workout.

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

## 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 ``doc://com.apple.healthkit/documentation/HealthKit/HKHealthStore/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)