How many different sequences/strings of length $\ell$ contain exactly $k$ (out of $n$) different elements?
Or, to put it differently, how many functions from $\{1,\dots,\ell\}$ to $\{1,\ldots,n\}$ have the property that their image is of size exactly $k$?