# CalculateChunkCount()

> Calculates the number of chunks that match this EntityQuery, taking into account all active query filters and enabled components.

## Definition

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

```csharp
public int CalculateChunkCount()
```

### Returns

| Type                                                       | Description                                                       |
| ---------------------------------------------------------- | ----------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The number of chunks based on the current EntityQuery properties. |

### Remarks

This count will not include chunks that do not pass any active chunk-level filters (e.g. [EntityQuery.SetSharedComponentFilter](/engine/7000.0/script-reference/unity/entities/entityquery/setsharedcomponentfilter.md)), nor any chunks where zero entities have all the required components enabled.
