---
title: Count()
product: Unity Editor
version: '6000.7'
latest_version: '7000.0'
status: This page documents version 6000.7. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashmap2/readonly/count
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashmap2/readonly/count.md
last_updated: 2026-09-14
generated_at: 2026-11-09T12:20:32.245Z
locale: en-us
---

# Count()

> The current number of key-value pairs in this hash map.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public readonly int Count()
```

### Returns

| Type                                                       | Description                                             |
| ---------------------------------------------------------- | ------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The current number of key-value pairs in this hash map. |
