I exercise, a lot. this helps me keep on track because I know that if I eat this or that, then my exercise was for nothing. Exercise is pretty hard for me (we went on a 8 mile bike ride yesterday) so there is NO way I am gonna ruin that.
I am not huge on counting calories.. I try to eat healthy. but I suggest counting them on days like that. then you can look and say no to something else. That way you physically see how much you are in taking and not blindly eating something that is bad for you..
I used to have the same problem as you..but with counting calories (on bad days) and exercising this has helped keep me on track