---
title: TECCountDestinationTextEncodings
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: coreservices/1571805-teccountdestinationtextencodings
---

# TECCountDestinationTextEncodings

Counts and returns the number of destination encodingsto which a specified source encoding can be converted in one step.

## Declaration

```occ
OSStatus TECCountDestinationTextEncodings(TextEncoding inputEncoding, ItemCount *numberOfEncodings);
```

## Parameters

- `inputEncoding`: The text encoding specification describing the source text.
- `numberOfEncodings`: On return, a pointer to the number of text encodings to which the source encoding can be converted in one step. You should use this to determine how large to make the array you pass to the doc://com.apple.documentation/documentation/coreservices/1571808-tecgetdestinationtextencodings function.

## Return Value

Return Value A resultcode. See Result Codes.

## Discussion

Discussion This function counts every instance of an encoding. If differentconversion plug-ins support the same direct text encoding, the directtext encoding is counted more than once. Since the TECGetDestinationTextEncodings functionignores duplicate text encoding specifications, TECCountDestinationTextEncodings mayreturn a number greater than the number of array elements neededfor the destinationEncodings[] parameter.

## See Also

### Identifying Possible Destination Encodings

- [TECGetDestinationTextEncodings](coreservices/1571808-tecgetdestinationtextencodings.md)
