---
name: "countType"
type: command
status: ok
groups: ["Object Detection"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/countType
revid: 377068
updated: 2026-01-01T09:25:18Z
---

# countType

*Command · Object Detection · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

Locality: arguments **global**

## Description

Count how many objects in the array are of given type. This command also works with parent classes like "Air", "Tank", and "Car". For a full class reference see Classes.

## Syntax

```sqf
type countType objects
```

**Parameters:**

- `type`: [String](../topics/String.md) - class type
- `objects`: [Array](../topics/Array.md) of [Object](../topics/Object.md)s

**Returns:** [Number](../topics/Number.md)

## Examples

### Example 1

```sqf
_count = "Tank" countType list _triggerOne;
```

### Example 2

```sqf
_count = "B_medic_F" countType units player;
```

## See also

[count](../commands/count.md) · [isKindOf](../commands/isKindOf.md) · [typeOf](../commands/typeOf.md) · [countFriendly](../commands/countFriendly.md) · [countEnemy](../commands/countEnemy.md) · [countSide](../commands/countSide.md) · [countUnknown](../commands/countUnknown.md)

<sub>Source: [BI Community Wiki — countType](https://community.bistudio.com/wiki/countType) (revision 377068).</sub>
