# selection.Selection.count

- **Module:** selection.Selection
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/selection.ts#L496
- **Page:** https://libtmux.org/reference/ts/selection-selection-count/

```
selection.Selection.count(criteria: : WhereOf<Model>) -> number
```

How many members match `criteria`, or how many there are without it.

## Example

```ts
snapshot.panes.count(); // every pane
snapshot.panes.count({ currentCommand: "vim" });
```
