---
title: MIDIGetNumberOfDestinations()
framework: coremidi
role: symbol
role_heading: Function
path: coremidi/midigetnumberofdestinations()
---

# MIDIGetNumberOfDestinations()

Returns the number of destinations in the system.

## Declaration

```swift
func MIDIGetNumberOfDestinations() -> Int
```

## Return Value

Return Value The number of destinations in the system, or 0 if an error occurred.

## See Also

### Endpoint management

- [MIDIEndpointDispose(_:)](coremidi/midiendpointdispose(_:).md)
- [MIDIEndpointGetEntity(_:_:)](coremidi/midiendpointgetentity(_:_:).md)
- [MIDIEndpointGetRefCons(_:_:_:)](coremidi/midiendpointgetrefcons(_:_:_:).md)
- [MIDIEndpointSetRefCons(_:_:_:)](coremidi/midiendpointsetrefcons(_:_:_:).md)
- [MIDISourceCreateWithProtocol(_:_:_:_:)](coremidi/midisourcecreatewithprotocol(_:_:_:_:).md)
- [MIDIGetSource(_:)](coremidi/midigetsource(_:).md)
- [MIDIGetNumberOfSources()](coremidi/midigetnumberofsources().md)
- [MIDIDestinationCreateWithProtocol(_:_:_:_:_:)](coremidi/mididestinationcreatewithprotocol(_:_:_:_:_:).md)
- [MIDIGetDestination(_:)](coremidi/midigetdestination(_:).md)
- [MIDIEndpointRef](coremidi/midiendpointref.md)
