Rules & Actions Method #2 - Ticket Tags.
Similar to the above solution, but this uses Ticket Tags to store course counts which allows you to open and closed tickets without loosing the counts.
Actions
Create Ticket Tag counters for Starters & Mains
Rules
Rule to Reset Ticket Tag counters at the start of a new ticket
Increase counters as Starters & Mains are added to the ticket
Add a free Dessert if atleast 1 Starter & Main have been added
Now we handle if items are cancelled
Screen Shots