# layout_count_cells

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L413
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-layout_count_cells/

```c
u_int layout_count_cells(struct layout_cell *lc)
```

## Parameters

- `lc` (`struct layout_cell *`)

## Called by

- [`layout_count_cells`](/en/tmux/3.7c/reference/c-function-layout_count_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L424)
- [`layout_parse`](/en/tmux/3.7c/reference/c-function-layout_parse/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout-custom.c#L212)

## Calls

- [`fatalx`](/en/tmux/3.7c/reference/c-function-fatalx/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L427)
- [`layout_count_cells`](/en/tmux/3.7c/reference/c-function-layout_count_cells/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/layout.c#L424)

## Referenced declarations

- [`layout_cell.cells`](/en/tmux/3.7c/reference/c-struct-layout_cell-cells/) (attribute)
- [`layout_cell.entry`](/en/tmux/3.7c/reference/c-struct-layout_cell-entry/) (attribute)
- [`layout_cell`](/en/tmux/3.7c/reference/c-struct-layout_cell/) (struct)
- [`LAYOUT_LEFTRIGHT`](/en/tmux/3.7c/reference/c-enum-layout_type-layout_leftright/) (constant)
- [`LAYOUT_TOPBOTTOM`](/en/tmux/3.7c/reference/c-enum-layout_type-layout_topbottom/) (constant)
- [`LAYOUT_WINDOWPANE`](/en/tmux/3.7c/reference/c-enum-layout_type-layout_windowpane/) (constant)
- [`layout_cell.type`](/en/tmux/3.7c/reference/c-struct-layout_cell-type/) (attribute)
