This is not how counterspell works in D&D 5E.
All your character would know was that a spellcaster within 60 feet of them was casting a spell. You do not know what the spell does. You do not know if it's a damage spell. You do not know if it is a cantrip. You do not know the level of the spell. You do not know if it is save or attack. The choice must be made immediately with zero additional information.
In your scenario the choice you would have is to use your reaction to counter an unknown spell or save your reaction to cast shield against that barbarian.
Exactly the same information you would have had you clicked a checkbox before combat.
That is a fair point. I could have used a better example. For instance, I could have said "I may intend to save my Uncanny Dodge for the Barbarian that is late on initiative, but if I see a Paladin with a Greatsword coming up to me casting a spell on himself, then swinging his weapon at me, I might decide to react to that instead." There are always examples where it is necessary to give the player the ability to make the decision, even if the example I gave there wasn't accurate.