Your cat only knows that when your there your yelling at her, so when you leave she does what she wants. The secret is to get the counter to tell her off. That way you don't have to be there the counter will correct her and she'll learn it's doesn't want her fluffy butt on it.
There are a few ways to do this. 1. Get some empty soda cans and fill them with pennies/pebbles, and tape the ends shut. Without her seeing you do this (put her in a room for a minute or something). Stack the cans 2 can high on the counter just out of her eye site but relatively close to the edge, if she sees them up there she will try a diff area, we don't want that, walk away and let her do her thing BUT you are not there so she doesn't associate it with you. When you hear the crash don't make a fuss or say anything, just quickly get them back into place, when you see her scramble outta there. repeat as needed. 2. Use a pce of plastic carpet runner, it has itty bitty spikes ( if spikes are large put a towel or something over it, we don't want to damage her paws, just deter) on it's underside, cut a pce to fit your counter, use tape or something heavy to keep it in place, set it up, again, without her seeing, and wait, she will jump up then back down, this you can remove for cooking and such, and place back there when needed.
Usually they will stop the counter surfing and expedition, and you may only have to every once and awhile put it up to remind them if they start to get up. This has become rewarding for the cat, (she got something out of it) so it's been rewarded and now a habit, which habits are harder to break. Let me know how it goes.