# GetDescendantCount(TypeIndex)

> Returns how many component types are known to the TypeManager that inherit from a given component type

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public static int GetDescendantCount(TypeIndex typeIndex)
```

### Parameters

**** (\[TypeIndex]\(/engine/7000.0/script-reference/unity/entities/typeindex)): Parent type

### Returns

| Type                                                       | Description                                                                 |
| ---------------------------------------------------------- | --------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Returns count of component types inheriting from typeIndex's component type |
