Depends on what you mean by hard-counter. The aim of mgs is to suppress which they all do quite quickly, not what you get angry at is the squad then crawling and throwing a grenade. However the mg had done it's job, it suppressed the infantry squad and was then loyally waiting for you to follow up with another squad of your own infantry to engage (which will keep the squad suppressed) and your mg can relocate.
Pinning is not the goal of mgs, it's suppression. Mgs don't hard-counter infantry by damage it's by suppression making those squads very vulnerable to your own infantry.
on a cost to cost basis MGs should beat more than their value in infantry. if an MG catches a unit (or units, depending on the situation) in its arc it should kill/force to retreat.
pinning is generally a negligible gameplay mechanic, it basically tells the player that they've left their infantry squad in a suppression area for too long and prevents some units from crawling all the way up to throw a grenade.
the only MG the preforms anything like that is the maxim, which on a 1 to 1 basis hard counters all infantry other than obers but can also hard counter them. on a group basis maxims are less powerful but still preform pretty well.