This is a classic separator problem.. In some material on combinatorics it is know as the stars & bars problem.
Consider
∗∗∗∗∣∣∣∣∣∣, four stars and six bars. that string can be arranged in
6!⋅4!10!=210 ways. Here is one way:
∗∣ ∣ ∣∗∗∣ ∣∗∣ We can see that the six bars create seven places
____∣____∣____∣____∣____∣____∣____ in which to place a star.
Thus there are
C47=35 ways to separate the stars.
If we have
N ∗′s and
k ∣′s then if
k≥N−1 we can separate the stars using the bars in
CNk+1 ways.