> For the complete documentation index, see [llms.txt](https://laot7490.gitbook.io/ltbridge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://laot7490.gitbook.io/ltbridge/game-systems/inventory/get-item-count.md).

# GetItemCount

Returns the count of an item in the player's inventory. Returns `0` if none found.

{% hint style="info" %}
**Side:** Client / Server · **Category:** Inventory · **API:** `LT.Inventory.GetItemCount`
{% endhint %}

## Example

```lua
-- Client
local count = LT.Inventory.GetItemCount('water')

-- Server
local count = LT.Inventory.GetItemCount(source, 'water', { durability = 100 })
```

## Parameters

| Name       | Required    | Description                      |
| ---------- | ----------- | -------------------------------- |
| `source`   | Server only | Player server ID                 |
| `item`     | Yes         | Item name                        |
| `metadata` | No          | Metadata filter table (optional) |

## Returns

* `number`
