Number of Dyck paths with k returns and b peaks The number of Dyck paths from the origin to $(2n,0)$ which touch the $x$-axis $k+1$ times ($k$ internal touches) is given by
$$\frac{k}{2n-k}{2n-k \choose n}.$$

The number of Dyck paths from the origin to $(2n,0)$ which have $b$ peaks (i.e. local maxima) is given by the Narayana numbers
$$\frac{1}{n}{n \choose b}{n \choose b-1}.$$

My questions is: What is the number of Dyck paths from the origin to $(2n,0)$ which have both $k$ returns and $b$ peaks?

Thanks!
If $n$=semi length of Dyck Path, $p$=peaks and $r$=returns then:

$$F(n,p,r)=\frac{r(n-1)!(n-r-1)!}{p!(p-r)!(n-p)!(n-p-1)!}$$

If $n=p=r$ then $F(n,p,r)=1$.

Example:
$$F(7,4,3)=\frac{3(7-1)!(7-3-1)!}{4!(4-3)!(7-4)!(7-4-1)!}=45$$
There are 45 Dyck Paths with a semi length of 7, 4 peaks and 3 returns.
See Online Encyclopedia of Integer Sequences A253938:


  A pyramid $F(n,p,r)$ of successive triangular arrays read by rows, relating Dyck path peaks and returns to the $x$ axis ($n = $ semilength of Dyck paths, $p =$ number of peaks, $r =$ returns to the $x$ axis).