Example: How many ways are there to distribute 15 fruits to 6 people so that each person has at least 1 fruit but no more than 3?
I understand how to do it when we need to make sure that at least 1 object goes to 1 box. This is the same as the number of surjections from a set of size $n$ to a set of size $r$. However, I am lost on finding the way to restrict the number of maximum number of objects that can be placed at each box.
You can do the calculation with recurrences.
Supposing you have $f$ fruit, $p$ people, $x$ maximum to each person, $y$ minimum to each person, want you want to count $w(f,p,x,y)$ ways of distributing the fruit. You can use:
in each case starting from $w(0,0,x,y)=1$ and $w(f,0,x,y)=0$ when $f\not = 1$.