---
title: "keyframeCount(_:forParameter:andChannel:)"
framework: Professional Video Applications
role: symbol
role_heading: Instance Method
platforms: [fxplug 4.0+]
path: "professional_video_applications/fxkeyframeapi_v3/keyframecount(_:forparameter:andchannel:)"
---

# keyframeCount(_:forParameter:andChannel:)

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

## Declaration

```swift
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

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

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).

## See Also

### Instance Methods

- [add(_:toParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/add(_:toparameter:andchannel:).md)
- [channelCount(_:forParameter:)](professional_video_applications/fxkeyframeapi_v3/channelcount(_:forparameter:).md)
- [keyframe(_:atOrAfter:fromParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/keyframe(_:atorafter:fromparameter:andchannel:).md)
- [keyframe(_:atOrBefore:fromParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/keyframe(_:atorbefore:fromparameter:andchannel:).md)
- [keyframe(_:forParameter:channel:andIndex:)](professional_video_applications/fxkeyframeapi_v3/keyframe(_:forparameter:channel:andindex:).md)
- [parameter(_:channel:hasKeyframe:at:)](professional_video_applications/fxkeyframeapi_v3/parameter(_:channel:haskeyframe:at:).md)
- [removeAllKeyframes(forParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/removeallkeyframes(forparameter:andchannel:).md)
- [removeKeyframe(at:fromParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/removekeyframe(at:fromparameter:andchannel:).md)
- [setKeyframeIndex(_:with:forParameter:andChannel:)](professional_video_applications/fxkeyframeapi_v3/setkeyframeindex(_:with:forparameter:andchannel:).md)
