For the first one, we have 4 different lollipop types and want to buy a total of 10 lollipops. So we use 3 bars and 10 stars. Something like this:
*** | ** | **** | *.
That above pattern would represent buying 3 of the first lollipop type, and 2, 4, 1 of the second, third and fourth...