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.
The DMs guide has little information on magic item crafting. Xanathar's has more guidelines, recommending (among other things) that the time and cost is based on the item rarity.
E.g. Rare = 10 weeks and 2000gp, Very rare = 25 weeks and 20,000gp.
One of the "other things" the guide also suggests is questing to gather rare material components etc.
These guidelines are really only for player characters though. For an NPC - especially one crafting an item special to their race such as the mind blade - its going to be entirely up to the DM. Even determining the rarity is going to be a judgement call (a mind blade is going to be extremely rare in general, but perhaps merely "uncommon" within mind flayer society).
Conclusion: it takes the "speed of plot".
Best Answer
Counterspell does not work against the mind flayer's spells
To use counterspell you must be aware of a spell being cast. However, Xanathar's Guide to Everything tells us that if a spell has no components it is imperceptible to all observers:
The mind flayer can cast several spells using Innate Spellcasting (Psionics) which says:
Thus, the mind flayer's spells cannot be perceived. And because of that they cannot be counterspelled.
Jeremy Crawford has confirmed the same ruling for the case in which Subtle Spell is used to remove all components from a spell:
Innate Spellcasting (Psionics), in general, can be counterspelled
Even though we know it won't work against the mind flayer it is worth looking at what the general rules for Innate Spellcasting (Psionics) are. Here's what the basic rules say about it:
So, if there is a monster that has Innate Spellcasting(Psionics) and uses it to cast a spell that does have components, it can be counterspelled because spells cast in this manner are just normal spells with no special rules and spells, in general, can be counterspelled.