> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dotouch-emu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# itemCount

> Obtenir la quantité d'un objet spécifique dans l'inventaire.

Obtenir la quantité d'un objet spécifique dans l'inventaire.

#### 🎮 Méthode

```lua theme={null}
inventory:itemCount(gid)
```

#### 📝 Arguments

| Nom   | Type  | Description                       |
| ----- | ----- | --------------------------------- |
| `gid` | `int` | Identifiant de l'objet (Game ID). |

#### 💎 Valeur de retour

| Type  | Description                 |
| ----- | --------------------------- |
| `int` | Quantité dans l'inventaire. |

#### 💡 Exemple

```lua theme={null}
local potions = inventory:itemCount(123)  -- ID de la potion de soin
if potions < 10 then
  global:printWarning("Potions insuffisantes !")
end
```
