I think that this behavior has got to be on my worst top 5 list. I hate when dogs are allowed; or maybe not allowed but get away with getting up on the counter and helping themselves to whatever they can find. And the thought of a cat wandering around on the counter top where the food is prepared; don't even get me started on the whole "cat" issue. Counter surfing tends to be one of those shoulder shrugging behavior. A behavior that humans see as "what can I do about it?"
There is lots to do about it and it should NEVER be allowed under any circumstance. So that means that if you have a surfer; one that you know will be shopping around the counter top when you leave; then you must keep them away from the kitchen. When you go out; they are crated, in a different room, outside or somewhere that they cannot indulge in their very bad behavior. This has to happen until you can get it under control.
Every time your dog surfs and scores; will make your job of stopping the behavior much harder. When your dog is successful in the quest for food from the counter top they are reinforcing their own bad behavior; being rewarding for getting up there. And this is what you have to keep in mind. The counter top, cupboards and refridgerator are to accessed by the humans and this should be strictly enforced. Once a dog can help themselves to your stuff whenever they choose all sorts of bad behaviors can start.
I'm sure I have already covered counter surfing on this blog, it is something that I feel very strongly about. But each time I am reminded of it I feel that I must cover the issue once again. The way to stop it is to first not allow it in your own mind. There will be no stealing of my food!! Next you stop any advances to the counter top, no sniffing, no head turning to reach further up onto the counter. I would definitely start with a 1 foot boundary so that you can be more aware of what is going on.
The startle tactic works best, it works best for many things. But and this is a big but you must be careful when startling your dog, you do not want fall out behaviors from it. All dogs are different and what one can tolerate another may become unravelled from. So tread carefully when startling. The best startle is when your dog thinks you are not watching but to their surprise you can see through walls and out the back of your head.
You need to make it like you cannot believe they were just considering what they were considering. Make short and sweet, feedback should NEVER, EVER be long and drawn out. Dogs don't do grudges, if you miss your moment to deliver the appropriate feedback you missed a chance to educate your dog. So when they go to sniff the counter, you pop out which is the startle; abruptly saying "get off of there." Once they move away you immediately stop and bring everything back to normal. You stopped the behavior you did not like; your job is done.
It is a good idea to make the kitchen your own (as Paula Abduhl would say). You say when your dog can and cannot come into the kitchen, this definitely helps with the surfing.