> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XApuGetResultCount

> XApuGetResultCount

Returns the number of [XApuResult](https://docs.xbox.com/reference/audio/xapu/structs/xapuresult.md) in the results queue.

## Syntax

```cpp theme={null}
uint32_t XApuGetResultCount(  
         XApuHandle handle,  
         uint32_t* totalResultCount  
)  
```

### Parameters

*handle*   \_In\_\
Type: XApuHandle

Handle returned by calling [XApuConnect](https://docs.xbox.com/reference/audio/xapu/functions/xapuconnect.md).

*totalResultCount*   \_Out\_opt\_\
Type: uint32\_t\*

Number of [XApuResult](https://docs.xbox.com/reference/audio/xapu/structs/xapuresult.md) structures in the output/results queue of the XAPU.

### Return value

Type: uint32\_t

If there is no command submitted or there is no [XApuResult](https://docs.xbox.com/reference/audio/xapu/structs/xapuresult.md) ready, the output will be zero, otherwise the return value will be greater than zero. If the return value is greater than zero, the caller must call [XApuDequeueResult](https://docs.xbox.com/reference/audio/xapu/functions/xapudequeueresult.md) for each [XApuResult](https://docs.xbox.com/reference/audio/xapu/structs/xapuresult.md) contained in the results queue.

## Remarks

This method will take a pointer to uint32\_t to return the *totalResultCount* for the current session.

This number represents the total results that have been processed since the session started and after [XApuConnect](https://docs.xbox.com/reference/audio/xapu/functions/xapuconnect.md) was called.

This number will be one when the first [XApuDequeueResult](https://docs.xbox.com/reference/audio/xapu/functions/xapudequeueresult.md) and it will keep increasing as more commands get processed and the results become available for consumption. This number will not go back to zero.

## Requirements

**Header:** xapu.h

**Library:** xapu.lib

**Supported platforms:** XBOX Series X|S

## See also

[XAPU](https://docs.xbox.com/reference/audio/xapu/xapu_members.md)


## Related topics

- [XApuDequeueResult](https://docs.xbox.com/reference/audio/xapu/functions/xapudequeueresult.md)
- [XApuConnect](https://docs.xbox.com/reference/audio/xapu/functions/xapuconnect.md)
- [XAPU](https://docs.xbox.com/reference/audio/xapu/xapu_members.md)
- [XApuConnectOutputParameters](https://docs.xbox.com/reference/audio/xapu/structs/xapuconnectoutputparameters.md)
- [XblMultiplayerGetSearchHandlesResultCount](https://docs.xbox.com/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayergetsearchhandlesresultcount.md)
