Creature spells fall under either Spellcasting or Innate Spellcasting.
These abilities reference to and are thus clearly linked to spells, which means they can be counter spelled due to the use of the word Spellcasting in their functionality.
An example of a creature with the SPELL CASTING trait would be a Lizardfolk Shaman. This creature can be found in the MM pg. 205.
An example of a creature with the INNATE SPELLCASTING trait (spell like abilities) would be an Ice Mephit in the MM pg. 215; or a Glabrezu in the MM pg. 58. Innate spellcasting functions differently in that it isn't limited to spell slots, and doesn't cost material components. So it's a spell-like ability, but can be counter spelled.
An example of a creature ability that is not a spell but seems like one is the Succubus/Incubus in the MM pg. 285. The abilities these creatures have don't fall under spells, meaning you can't Counterspell a Succubus Charm ability. This action is an ability much like a Barbarians Rage or a Druid's Wildshape.
And specifically, a Beholder does not use either Spellcasting or Innate Spellcasting, meaning it's eye stalk death beams of glorious carnage are an awesome, awesome, ability.
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
Yes, artificers can be counterspelled
Although the "flavoring" is different, artificers' spells have the same kinds of components that other spellcasters do. In essence, rather than drawing on some innate magic or some eldritch power, or manipulating the Weave through studied techniques or through music, artificers instead cast spells by infusing magic into items and then releasing it from those items.
This distinction is described in more detail in the sidebar "The Magic of Artifice" on p. 4-5 of the UA:
As the last paragraph clearly states, artificers' form of spellcasting is unique in the way it is described and roleplayed, but mechanically it has just the same components as any other class' spellcasting. As such, other spellcasters can perceive artificers casting a spell, and can counterspell them.