My 2 year old dog is still jumping up onto the counter to scavenge any food she possible can which happens to be mostly bread. I try to remember to put my bread in the fridge at the end of every day but its not a habit I am easily succombing to

My question here is how can I teach my dog its wrong if she doesn't do it when I am awake, or sometimes even home??? (obviously she knows its wrong as she runs and hides when I wake up) I need help or I'm gonna snap lol