Compound events: find the number of sums