# window_count_panes

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L773
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-window_count_panes/

```c
u_int window_count_panes(struct window *w)
```

## Parameters

- `w` (`struct window *`)

## Called by

- [`cmd_break_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-break-pane-c-cmd_break_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-break-pane.c#L76)
- [`cmd_join_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-join-pane-c-cmd_join_pane_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-join-pane.c#L164)
- [`layout_parse`](/en/tmux/3.2a/reference/c-function-layout_parse/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/layout-custom.c#L180)
- [`layout_set_even`](/en/tmux/3.2a/reference/c-function-layout-set-c-layout_set_even/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/layout-set.c#L128)
- [`layout_set_main_h`](/en/tmux/3.2a/reference/c-function-layout-set-c-layout_set_main_h/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/layout-set.c#L196)
- [`layout_set_main_v`](/en/tmux/3.2a/reference/c-function-layout-set-c-layout_set_main_v/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/layout-set.c#L294)
- [`layout_set_tiled`](/en/tmux/3.2a/reference/c-function-layout-set-c-layout_set_tiled/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/layout-set.c#L391)
- [`server_kill_pane`](/en/tmux/3.2a/reference/c-function-server_kill_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server-fn.c#L183)
- [`window_tree_build`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_build/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L499)
- [`window_tree_draw_window`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_draw_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L675)
- [`window_zoom`](/en/tmux/3.2a/reference/c-function-window_zoom/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window.c#L591)

## Referenced by

- [`cmd_select_pane_exec`](/en/tmux/3.2a/reference/c-function-cmd-select-pane-c-cmd_select_pane_exec/) (function)
- [`format_cb_window_panes`](/en/tmux/3.2a/reference/c-function-format-c-format_cb_window_panes/) (function)
- [`server_client_push_stderr`](/en/tmux/3.2a/reference/c-function-server_client_push_stderr/) (function)

## Referenced declarations

- [`window_pane.entry`](/en/tmux/3.2a/reference/c-struct-window_pane-entry/) (attribute)
- [`window.panes`](/en/tmux/3.2a/reference/c-struct-window-panes/) (attribute)
- [`window`](/en/tmux/3.2a/reference/c-struct-window/) (struct)
