Put him in armor he's not proficient in.
In 5e you cannot cast spells while wearing armor you're not proficient in. So unless the sorcerer has dipped Fighter and is therefore proficient in all armor (one of the quirks of 5e), wearing armor he's not proficient in renders him unable to cast spells. Plus, the armor makes it more difficult for him to escape without the time to remove it. Make sure to keep him tied up at all times though. So when adventuring it pays to bring along some extra armor, just in case you encounter evil enemy spellcasters (or evil Druids in earlier editions, where Druids became unable to cast spells or Wild Shape when wearing metal armor).
Note that this will work only once, and a savvy DM will have his villains minor in Fighter while attening Evil Spellcaster School to get a workaround for this.
To sum up the mechanics of counterspell:
If a creature with counterspell available can perceive any spell within range being cast, they can attempt to counter it. They don't need to know what spell it is, or even have it on their class list to make the counter. Based on this, and what I gather from your context, the short answer is: yes the NPC could have cast counterspell.
Let's tackle the issues one at a time with this knowledge:
Issue 1:
The NPC doesn't have to know that a silence spell is being cast. All they need to know is that a spell is being cast at all. Counterspell counters any spell after all. How would they know that a spell is being cast? Because silence has verbal and somatic components. So, as long as the NPC can see or hear the caster casting something, the NPC has the option to counterspell it.
Issue 2:
Yes. It's been established in the Sage Advice Compendium that (emphasis mine):
If a spell that’s altered by Subtle Spell has no material component, then it’s impossible for anyone to perceive the spell being cast. So, since you can’t see the casting, counterspell is of no use.
So, if the NPC can't perceive the spell being cast, then they can't counterspell it. In most circumstances (casting during combat or from a different room) it's up to the DM to determine if the NPC can perceive the casting. But if the DM rules (or is convinced) that the NPC can't perceive the casting, then the NPC can't counterspell. In this case, I assume that the NPC could see you casting, and you were within range, so counterspell would have been a legal reaction.
Issue 3:
It could, though it doesn't have to. There are some optional rules that allow creatures to identify a spell as it's being cast, but those are... well... optional. Unfortunately, the DM just has to make a call on what this particular NPC would do, and stick to it. There is no rule pulling the decision one way or another. It's reasonable for the DM to rule that the NPC would take the risk and not counterspell whatever you decide to cast. But, it's just as reasonable for them to rule that the NPC would assume that any spell you cast is a threat that can't be allowed to pass, and so would counterspell it regardless of what it turned out to be.
Issue 4:
Technically, a creature doesn't automatically know anything about the effect of whatever spell a different creature is in the process of casting. But the rules are, again, silent on this matter beyond that. So, if the group decided that minimizing metagaming is something that they want to strive for, neither they, nor the DM should know what spell is cast before deciding to counterspell. But that is a conversation that you all will need to have as a group. Some groups are more lenient where everyone knows what spells are being flung around. And still others let the players know what the enemies cast, but not the other way around. You all have to decide for yourselves what would be the most fun.
Best Answer
You might not even need Subtle Metamagic
The Knock spell states that:
As long as you are outside the Silence when you cast the spell, but the object itself is inside, the Silence spell will absorb the loud noise.
Knock has a 60ft range, so it should be perfectly doable to stand outside the Silence field and cast the spell into it.