Wow. I must discourage you immediately from using mousetraps, which could be very dangerous.
Keeping your dog away from the counter - and teaching your dog not to jump up on the counter is two very different things. You must be completely 100% strict as to what your rules are, keeping him away from the counter when there is food and letting him roam around freely when there isn't, will send mixed messages to your dog.
I believe you should train your dog to never stand up to the counter, no matter what. And the only way you can ever train this with him is by catching him in the act.
By placing a flat collar and a long line or a leash on your dog, you will be able to get him off the counter when you see him do it. Whenever you see him jumping up, whether you are a foot away or 10 feet away, you should immediately give a loud "AAAARRRHHH!!!" and immediately go to your dog and use the leash to bring him down. Make sure that you are pulling downwards so that you do not pull him sideways and injure him. Release the leash as soon as all four paws are on the ground. Then you can go ahead and go about your business, without being mad at him or anything.
Eventually you can even set up scenarios where you leave a plate on the counter or any kind of food where he might attempt this. You can even step outside and look through the window and see if he’ll jump up. Do the same thing as above if he does.
But the main thing, and very important is that he never gets any food from the counter. It’s obvious that he has been successful more than once at getting food from the counter, so he’s learned that he can get away with it. From now on, if you want a dog that doesn’t go up on your counter – never give him any treats from the counter – never give him any food from the counter – never give him any table scraps from the counter. Everything he eats should be from his food bowl or from a training session with you, which he earns.