How to Eat in Moderation Without Turning it into a Diet

You see this term used all the time. All foods fit, but only in moderation. So does that mean 1 cookie is okay but 10 aren’t okay? Are 2 cookies okay? 3? Where do we draw the line on moderation?