Cats will do whatever they ant regardless of what you want them to do. While you can try training your cat, it’s best to modify your cat’s behavior in ways that get them to do what they want that happens to coincide with what you want them to do.
To keep cats off a counter, put sticky tape on there so the cat learns to avoid the counter. Then provide the cat with plenty of shelves, posts, and other high areas where it can satisfy its need to be off the ground. By providing both a deterrent and an approved way to behave, you can (hopefully) train your cat to avoid wrecking your life any more than it normally does.