There is one set of 5 coins; 5 sets of 4 coins, 10 sets of 3, 10 sets of 2 and 5 sets of one.
1+5+10+10+5=31. This is (a). There is one other set, the null set, which is not used, because she is going to leave at least one coin as a tip. The set consists of 5 coins. The other sets are subsets.
If she wants change left she cannot use the single set of 5, but all the other sets would leave her with at least one coin in change. So (b) is 30. So the sets counted in (b) are a subset of those counted in (a).