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 \(\dfrac{10!}{6!\cdot 4!}=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 \(\mathcal{C}_4^7=35\) ways to separate the stars.
If we have \(N~*'s\) and \(k~|'s\) then if \(k\ge N-1\) we can separate the stars using the bars in \(\mathcal{C}_N^{k+1}\) ways.