There are many combinations of upgrades and guns that may be more effective against each other. Typically, certain guns counter each other, but the skill, play-style, and upgrades of the user can alter the outcome dramatically. :) xD
Below are a few of the common or technical counters (the facts are straightforward).
Sniper beats LMG The sniper takes three shots at most to kill a player high health and armor. LMG users suffer at range due to the low movement speed and low range, allowing a competent sniper to kill them quickly.
Shotgun beats sniper: The shotgun is a relatively light weapon, allowing the user to rush and take cover as an advantage towards the sniper user) because it can one-shot players at close range. Closing distance and being a good dodger is essential; beware of crack shots and knife users. (this is wrong)
Pistol beats shotgun: Because the pistol is so light, the user can outpace the shotgun, using the impressive damage and range to wear the enemy down. Keep in mind, experienced shotgun users will use cover to try and get up-close where they can kill you easily.
Assault beats SMG: Users are about matched in mobility and firepower, but the assault rifle is more accurate, has more range, and can output more damage-per-shot in a balanced fight.
LMG can generally beat shotgun plus SMG due to it's raw firepower at medium-short range. The LMG can cut down shotgun users as they try and get close. However, the long reload means that it's easy to catch off-guard.
Generally, the pistol and assault classes ( PS: Assault is more supportive and Pistol is rather more Guerrillaare war type) hard to counter due to their massive potential and usage in many different situations. Skilled players can kill other players regardless of their weapons, but the above aforementioned are the general weapon advantages.