Yep, you can achieve that using the formatResult
and/or formatSelection
methods. There's a great example of using them in the Select2 Docs: Templating.
In your format
function, filter out the " (22)" part of your value and return everything before it.
On a UX note, it could be strange to see matches appear that don't give any indication as to why they match. If that doesn't matter for your use-case, carry on.