Does this LCS algo generate all the CS or only all the LCSs?
Wikipedia is being sloppy. The procedure returns all LCSs of $X[1..i]$ and $Y[1..j]$, which corresponds to $C[i,j]$. It should mention that in order to obtain all LCSs, we need to set $i=m$ and $j=n$.
If $X[i] = Y[j]$, then every LCS of $X[1..i]$ and $Y[1..j]$ is obtained by taking an LCS of $X[1..i-1]$ and $Y[1..j-1]$, and adding to it $X[i] = Y[j]$.
If $X[i] \neq Y[j]$, then every LCS of $X[1..i]$ and $Y[1..j]$ must be either an LCS of $X[1..i-1]$ and $Y[1..j]$, or an LCS of $X[1..i]$ and $Y[1..j-1]$ (or both). If $C[i-1,j] &gt; C[i,j-1]$, then only the former are LCSs of $X[1..i]$ and $Y[1..j]$. If $C[i-1,j] &lt; C[i,j-1]$, then only the latter are LCSs of $X[1..i]$ and $Y[1..j]$. If $C[i-1,j] = C[i,j-1]$, then both types are LCSs of $X[1..i]$ and $Y[1..j]$.
This recursive procedure could count the same sequence more than once — this happens for example for the arrays $ab$ and $ac$, where $a$ will be reached twice.