line-number-at-pos works fine when
visual-line-mode is off.
But I can't find its equivalent for
The "visual line number, counting from point-min" depends on the window width, font choice, font size, etc... so a given buffer's position can have several different "visual line numbers" at the same time if it's displayed in different windows.
So Emacs does not really try to provide this info.
OTOH you can easily get the "visual line number, counting from windows-start", using
Oh, and there's apparently
count-screen-lines (as well as
compute-motion) which should be able to provide the info you want.
(defun visual-line-number-at-pos () (count-screen-lines (point-min) (save-excursion (beginning-of-visual-line) (point))))