First reduce the number of bags by subtracting the required minimum number in each bag. Using your notation: C' = C-SP. Now, you're freely place the remaining C' items into $P$ boxes. Which is (C'+P-1)!/C'!(P-1)!
Take your example: 4 Boxes, 24 Bags and each Box should get 6 Bags. C'= 24-6*24 = 0, $(0+4-1)!/0!(4-1)!=1$. There is only one way!
In the referenced link they use $S=1$, which makes C'=C-P, so the formula $\binom{C-1}{P-1}$
There is a nice visualization for this, which you don't have to remember the formula. Let's solve the case for 3 identical items to 3 bags (after reducing the required minimum), where items are not distinguishable.
Assume we are placing 2 |'s and 3 x's in 5 slots. Some cases are (do all as an exercise):
|xxx|
x|x|x
xxx||
...
Since there are 5 things (| and x) there are $5!$ ways of distributing them. However, we don't differentiate between individual |'s and individual x's so $2!3!$ will be idential to some other and won't be counted. The total number "unique ways" is $5!/(2!3!) = 10$. The \$1M visualization trick is thinking the |'s as the bag (usually states as box) boundries and the left most and right most bags are one sided. Note that the number of bags is one more than the boundaries. The formula you'll derive is $\binom{\text{bags}+\text{items}-1}{\text{items}}$