# GetTreeCount()

> Gets the TreeView's total number of items.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public int GetTreeCount()
```

### Returns

| Type                                                       | Description                           |
| ---------------------------------------------------------- | ------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The TreeView's total number of items. |
