Welcome to Smogon! Take a moment to read the Introduction to Smogon for a run-down on everything Smogon, and make sure you take some time to read the global rules.
A counter must be able to both switch into the pokémon it's supposed to counter, with little to no risk to itself, and also pose an immediate threat to said pokémon.