# GetItemCount()

> Get number of items in the menu.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public int GetItemCount()
```

### Returns

| Type                                                       | Description                      |
| ---------------------------------------------------------- | -------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of items in the menu. |
