---
title: TECCountAvailableSniffers
framework: Core Services
role: symbol
role_heading: Function
platforms: [macOS 10.0+]
path: coreservices/1571795-teccountavailablesniffers
---

# TECCountAvailableSniffers

Counts and returns the number of sniffers available inall installed plug-ins.

## Declaration

```occ
OSStatus TECCountAvailableSniffers(ItemCount *numberOfEncodings);
```

## Parameters

- `numberOfEncodings`: On return, a pointer to the number of sniffers in all installed plug-ins. You can use this number to determine what size array to allocate for a parameter of the doc://com.apple.documentation/documentation/coreservices/1571841-tecgetavailablesniffers function.

## Return Value

Return Value A resultcode. See Result Codes.

## Discussion

Discussion This function counts every instance of a sniffer. If differentconversion plug-ins support a sniffer for the same encoding, thesniffer is counted more than once. Since the TECGetAvailableSniffers functionignores duplicate sniffers, TECCountAvailableSniffers mayreturn a number greater than the number of array elements neededfor the availableSniffers[] parameterof the TECGetAvailableSniffers function.

## See Also

### Using Sniffers to Investigate Encodings

- [TECCreateSniffer](coreservices/1571832-teccreatesniffer.md)
- [TECClearSnifferContextInfo](coreservices/1571850-tecclearsniffercontextinfo.md)
- [TECDisposeSniffer](coreservices/1571854-tecdisposesniffer.md)
- [TECGetAvailableSniffers](coreservices/1571841-tecgetavailablesniffers.md)
- [TECSniffTextEncoding](coreservices/1571836-tecsnifftextencoding.md)
