That's hilariously flawed logic if the reason is simply; "I otherwise like working here but I feel I'm underpaid".
He seems a bit dumb, while a company may be selective re: counter offers, some people perhaps aren't worth it and some people you may even be happy to see gone as they don't add any value there will often be people the company ought to keep.
It's pretty standard to the point where a good recruiter might not only sus out your desired salary range early on but might also, as part of that conversation, directly ask about why you're leaving and whether you'd accept a matching counteroffer from your current employer simply because they're hoping to have eliminated any surprises (for them) if their client does eventually want to extend an offer.