count-windows

count-windows is a compiled Lisp function in `window.el'.

(count-windows &optional MINIBUF)

Return the number of live windows on the selected frame.
The optional argument MINIBUF specifies whether the minibuffer
window shall be counted. See `walk-windows' for the precise
meaning of this argument.