---
title: "CFBinaryHeapGetCountOfValue(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbinaryheapgetcountofvalue(_:_:)"
---

# CFBinaryHeapGetCountOfValue(_:_:)

Counts the number of times a given value occurs in a binary heap.

## Declaration

```swift
func CFBinaryHeapGetCountOfValue(_ heap: CFBinaryHeap!, _ value: UnsafeRawPointer!) -> CFIndex
```

## Parameters

- `heap`: The binary heap to search.
- `value`: The value for which to find matches in the binary heap. The compare callback provided in the doc://com.apple.corefoundation/documentation/CoreFoundation/CFBinaryHeapCallBacks structure when the binary heap was created is used to compare. If value, or any of the values in the binary heap, are not understood by the compare callback, the behavior is undefined.

## Return Value

Return Value The number of times value occurs in heap.

## See Also

### CFBinaryHeap Miscellaneous Functions

- [CFBinaryHeapAddValue(_:_:)](corefoundation/cfbinaryheapaddvalue(_:_:).md)
- [CFBinaryHeapApplyFunction(_:_:_:)](corefoundation/cfbinaryheapapplyfunction(_:_:_:).md)
- [CFBinaryHeapContainsValue(_:_:)](corefoundation/cfbinaryheapcontainsvalue(_:_:).md)
- [CFBinaryHeapCreate(_:_:_:_:)](corefoundation/cfbinaryheapcreate(_:_:_:_:).md)
- [CFBinaryHeapCreateCopy(_:_:_:)](corefoundation/cfbinaryheapcreatecopy(_:_:_:).md)
- [CFBinaryHeapGetCount(_:)](corefoundation/cfbinaryheapgetcount(_:).md)
- [CFBinaryHeapGetMinimum(_:)](corefoundation/cfbinaryheapgetminimum(_:).md)
- [CFBinaryHeapGetMinimumIfPresent(_:_:)](corefoundation/cfbinaryheapgetminimumifpresent(_:_:).md)
- [CFBinaryHeapGetTypeID()](corefoundation/cfbinaryheapgettypeid().md)
- [CFBinaryHeapGetValues(_:_:)](corefoundation/cfbinaryheapgetvalues(_:_:).md)
- [CFBinaryHeapRemoveAllValues(_:)](corefoundation/cfbinaryheapremoveallvalues(_:).md)
- [CFBinaryHeapRemoveMinimumValue(_:)](corefoundation/cfbinaryheapremoveminimumvalue(_:).md)
