This is what is known in combinatorics as a "partition problem", and I have never seen a partition problem on the actual GMAT. Here we're trying to count how many non-negative integer options we could use to fill in a, b, c and d in the equation:
a + b + c + d = 10
where a represents how many of the first type of candy bar Sarah buys, b how many of the second type, and so on.
Really what we're doing is 'partitioning' ten things, so if you take three partition markers "|" and ten dots "•", each different way we can arrange those will give us a different solution to the equation above. So this partition:
• • • | • • | • • • • | •
corresponds to the solution 3 + 2 + 4 + 1, for example (counting the dots on each side of the partition markers), while this:
||• • • • • • • • | •
corresponds to the solution 0 + 0 + 9 + 1. Since we're choosing where to put 3 markers from 13 possibilities (13 because we need to be able to put the markers immediately next to each other in order that our letters can equal zero), the answer is 13C3 = (13)(12)(11)/3! = 13*2*11 = 286.
I'd be surprised if the GMAT ever tested partitions when your numbers need to be positive integers (e.g. "how many positive integer solutions are there to x + y + z = 12?", but conceptually these problems are much more difficult to think through from scratch (which is what almost every test taker would be doing) when the unknowns can equal zero, so I'd be absolutely shocked to see a question like this one on the real GMAT. It seems way out of scope. The problem also isn't correctly worded, but that's a less important issue here.