# Count()

> Returns the total number of items in the buffers of this stream.

## Definition

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

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

### Returns

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

### Remarks

Each [UnsafeStream.Writer.Write](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafestream/writer/write.md) and [UnsafeStream.Writer.Allocate](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafestream/writer/allocate.md) call increments this number.
