A Clear Path to the Target (PHB pg. 204)Exhausted his spells on what? He can see out, but the door is still in the way so he has no line of effect to anyone. From the PHB, "To target something, you must have a clear path to it,so it can’t be behind total cover." Now, the following sentence does say can't see and blocked, but the prior indicates that blocked is enough, so the DM will have to rule on the contradiction. There's a very good chance that the wizard just trapped himself and twiddles his thumbs. At least if you have a fair DM.
There are also other spells besides knock that will get the party through that door or block vision so that that the wizard definitely cannot cast spells and his escape is out to the party.
For someone who made such bad assumptions about my ability to design an encounter, yours isn't very good. I would have thought you'd be an expert at encounter design, what with the way you were throwing rocks in a glass house.
"To target something, you must have a clear path to it, so it can't be behind total cover."
Cover (PHB pg 196)
A target with total cover can't be targeted directly by an attack or a spell, although some spells can reach such a target by including it in an area of effect. A target has total cover if it is completely concealed by an obstacle.
The caster can be behind total cover, just as an archer can fire through an arrow slit. The only "contradiction" a DM has to adjudicate would be how big a hole there has to be in total cover for a person to cast a spell through it and for it to still be total cover -- probably less than an arrow slit, but bigger than a gold piece. Also, while I understand your meaning, Line of Effect isn't really a term in 5e.
No the mage hasn't trapped himself.
Yes, there are other spells that allow one to get through barriers, they just aren't commonly employed by parties that prioritize counterspell in their spell selections.
No, the mage in question isn't behind a door. The door just leads to the sanctum which isn't in the room the mage is viewing. The point of the triple locked door is just to slow the party down (assuming they can find it in the first place).
It is like you have never played the game. If you really need me to, I can draw a map for you, since you cannot seem to imagine how it would work.
Your assumption here is that the NPC mages are only casting directly at the PCs. All of the tricks I have mentioned are designed to give the mage space and time to bring out their spells. Many spells don't require the mage to have LOS/LOE for them to cast. For example, Greater Invisibility is only useful if the mage has time and space to cast it. If the mage risks been countered or pincushioned by archers it is a bit of a waste. Summons, buffs and the like also work well, and the aforementioned Magic Jar.
I can also see how if D&D 5e is the only game you have played why you might not think of "extreme" measures like these. However, in previous versions (1st, 2nd, and 3rd) spellcasters could be interrupted without using counterspell, so a prudent caster did their best to avoid having a direct reciprocal LOS to their opponents. In 1st edition, my cleric could never get a spell off if I had LOS to a wizard as they would interrupt my spells with magic missile. (MM was a fast spell and all Cleric spells were slow.)
You seem to think counterspell is a god spell that cannot be trivially dealt with. Just like you seem to think medicine is a god skill that is used all of the time. While they might indeed by that powerful in games you run, they are not at most tables. I have been playing/running D&D (and other RPGs) for a very long time. The number of opportunities for counterspell to be effective are few and far between. Just like the number of opportunities for medicine to be used are few and far between (assuming that both existed in their current form in older/other games).
If you feel that counterspell is that powerful, I would first challenge you to look at your encounter design and rethink how you run NPC mages. On the other hand, if your players are complaining about getting countered, I would challenge them to play their mages smarter.
It seems like your posts are just trying to pick a fight. You also show look up the word "assumption" since you have been using it wrong every single time.
Note: I am using mage in the generic sense to mean anyone that casts spells as typing spellcaster over and over is cumbersome. Obviously, different casters have to employ different strategies, but the idea is that casters should avoid, when possible, exposing themselves to attacks/counters. It is why warlocks with Devil's Sight and darkness have such an advantage -- cast darkness on a rock while behind total cover, step out and EB your foes to death. You can see them and they cannot see you.