window-buffer-height

window-buffer-height is a compiled Lisp function in `window.el'.

(window-buffer-height WINDOW)

Return the height (in screen lines) of the buffer that WINDOW is displaying.
WINDOW must be a live window and defaults to the selected one.