There really isn’t an “ideal” number of guests for a cookie exchange. The main thing the number of guests impacts for a cookie exchange is the number of cookies you are asking people to make, so as long as you are making sure to inform guests of how many cookies to make then you can’t go wrong with any size. I’ve done cookie exchanges with small groups of 5-6 and large groups of 30-40 and they were all fun and enjoyable.