Only having an actual patent gives you a weapon for a counterclaim. And it's a weapon only if the company suing you for infringement is itself infringing your patent.
Sometimes, yes, but not always. It once worked out that way for one of my clients. The client got a letter from another company's lawyer, saying, "you may be interested in this patent." That's code for a threat to sue. The other company was a legitimate company that actually made stuff; it wasn't a troll, er, non-practicing entity.
My client had solid evidence that it had come up with the invention several years before, and that it had not abandoned, suppressed, or concealed the invention. This put the client in a position to make a powerful invalidity argument, one that can be especially persuasive to a jury -- even assuming this invention was patentable, we'd have been the ones entitled to the patent, not them.
I sent a letter to the patent owner's lawyer (whom I knew), saying, almost in so many words: I've reviewed some prior art not cited by the patent examiner, and my client is not the least bit interested in discussing your client's patent. The lawyer asked if I'd send him a copy of the prior art. I said, if you file a lawsuit, you'll get the prior art in the ordinary course of discovery. The lawyer evidently got the message - we never heard from them again, at least not on that subject.
(As usual, YMMV, and don't rely on this anecdote as a substitute for legal advice. Knowingly infringing a patent without clear and convincing evidence of invalidity could result in being held liable for willful infringement. That in turn could mean having to pay treble damages and the patent owner's attorneys' fees, which will almost always be considerable.)