<!--
{
  "availability" : [
    "FxPlug: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "professional_video_applications",
  "identifier" : "/documentation/professional_video_applications/FxKeyframeAPI_v3/keyframeCount(_:forParameter:andChannel:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Professional Video Applications"
    ],
    "preciseIdentifier" : "c:objc(pl)FxKeyframeAPI_v3(im)keyframeCount:forParameter:andChannel:"
  },
  "title" : "keyframeCount(_:forParameter:andChannel:)"
}
-->

# keyframeCount(_:forParameter:andChannel:)

Returns the number of keyframes for a parameter’s channel.

```
func keyframeCount(_ count: UnsafeMutablePointer<Int>, forParameter parameterID: Int, andChannel channelIndex: Int) -> (any Error)?
```

## Parameters

`count`

Receives the number of keyframes in the given channel.

`parameterID`

The ID of the parameter you want to get the keyframe count for.

`channelIndex`

The index of the channel within the parameter that you want to retrieve the keyframe count from.

## Return Value

If any errors occur while getting the keyframe count, the return value will be a pointer to an `NSError` describing the problem. Otherwise, the return value is `nil`.

## Discussion

Given a parameter, you can get the number of keyframes for any one of its channels. For a slider, toggle button (checkbox), or angle parameter, there will be only 1 channel (indexed starting at `0`), whereas a point parameter will have 2 channels (x and y), and a color channel will have 4 (R, G, B, and A).

---

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)