---
name: "countFriendly"
type: command
status: ok
groups: ["Sides"]
arma3_since: "0.50"
locality: {"argument": "global", "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/countFriendly
revid: 377182
updated: 2026-01-01T10:49:48Z
---

# countFriendly

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

Locality: arguments **global**

## Description

Count how many units in the array are considered friendly to the given unit.

## Syntax

```sqf
unit countFriendly others
```

**Parameters:**

- `unit`: [Object](../topics/Object.md)
- `others`: [Array](../topics/Array.md) of [Object](../topics/Object.md)s

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

## Examples

### Example 1

```sqf
_num = player countFriendly list _triggerOne;
```

## See also

[count](../commands/count.md) · [countEnemy](../commands/countEnemy.md) · [countUnknown](../commands/countUnknown.md) · [countSide](../commands/countSide.md) · [countType](../commands/countType.md)

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