Counter surfing is when your dog places his/her front paws somewhere that they don't belong. This can include counters, tables, garbage cans and furniture as well as any other object that the owner decides is out of bounds.
The first rule when training a dog not to counter surf is to make the correction a "correction from above" meaning that it has nothing to do with you. For example, if your dog puts his feet on a table and you run into the room to correct him he will learn two things: 1) He can put his feet on things as long as you're not nearby and, 2) Putting his feet where they don't belong will bring you running.
Some things that you can use for correction are balloons (they make a loud noise when they pop), "snappy trainers" (modified mousetraps that you can find at most pet supply stores) or shake cans (soda can with 10 pennies in it). Anything that is loud and scary can be used…feel free to be creative!
The next step is to set him up. Leave something on the table/counter that he will want to grab. Then you can either have the snappy trainers/balloons set up to snap when he puts his feet up or you can hide around the corner and toss the shake can near his feet when he jumps up.
Since the scary correction has nothing to do with you he will specifically associate it with what he was doing at that moment- counter surfing.