To find the number of ways to put $14$ identical balls into $4$ bins with the condition that no bin can hold more than $7$ balls.
I have tried the following:
The total no of ways to distribute $14$ identical balls into $4$ bins without any restriction is $$\binom{14+4-1}{4-1}= \binom{17}{3}.$$
Note that there can't be two bins with more than $7$ balls since we have only $14$ identical balls only.
Now, we count the no. of ways so that one bin has more than $7$ balls. So, it has at least $8$ balls and the remaining $6$ can be distributed in $\binom{6+4-1}{4-1}= \binom{9}{3}$ ways. We can choose one bin out of $4$ in $4$ ways.
Hence the reqd number of ways = $$\binom{17}{3} - 4 \times \binom{9}{3}.$$