# GetCategoriesCount()

> Returns number of ProfilerCategory registered in Profiler.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Profiling](/engine/6000.7/script-reference/unityengine/profiling.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static uint GetCategoriesCount()
```

### Returns

| Type                                                         | Description                                                                                                                       |
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
| [uint](https://learn.microsoft.com/dotnet/api/system.uint32) | Returns number of [ProfilerCategory](/engine/6000.7/script-reference/unity/profiling/profilercategory.md) registered in Profiler. |

### Remarks

Returns a total number of [ProfilerCategory](/engine/6000.7/script-reference/unity/profiling/profilercategory.md) registered in the Profiler. Can be used together with [Profiler.GetAllCategories](/engine/6000.7/script-reference/unityengine/profiling/profiler/getallcategories.md) to pre-allocate a container to the required size.
