Edit: Thanks! I tried to improve this answer with a few more examples. Don't hesitate to give feedback.
Rule #1: Player skills over champion matchup. Don't pick a champion you don't feel confident with, just because it should counter your opponent. (Unless you want to practice, of course.)
Rule #2: Don't blindly trust LoLcounter. Why should you?
Rule #3: Every single patch makes part of LoLcounter outdated. Perhaps you shouldn't trust it at all.
Rule #4: If you want, or need to rely on it, detailed and up-to-date comments and debates are worth infinitely more than votes. Frustrated players who lost their lane can, and will vote regardless of whether they have been countered or not. tl;dr most votes are unreliable.
That being said... There are indeed game mechanics that favor some champions in a given matchup. A few examples:
Ryze can root (W, "Arcane Prison") an opponent before damaging him. Kennen's "woohoo" sprint (E, "Lightning Dash") makes him unable to do anything except moving fast, and that is his main farming tool. Therefore, farming with Lightning Dash in front of Ryze is almost impossible.
Short-ranged champions with no gap-closing abilities, e.g. Udyr or Ryze (yes, he has ranged attacks, but his range is shorter than most AP carries) are weak to kiting. Ashe counters Udyr (he can never reach her) and Cassiopeia counters Ryze (she can harass him with Q forever while never entering his casting range). Among AD carries, Caitlyn counters Vayne for the same reason, even though it is less obvious.
Some champions have silencing abilities. They tend to fare better against casters, who rely on casting spells to deal damage.
Jax can dodge basic attacks during his majorette stance (E, "Counter Strike"). That gives him an edge over champions who mostly rely on basic attacks, e.g. AD carries, Tryndamere, AD Master Yi, etc.
Lee Sin has two abilities revealing stealthed champions (Q, "Sonic Wave", and E, "Tempest"), i.e. he counters Wukong, Akali, etc.
Kennen's and Fiddlesticks' ultimates ("Slicing Maelstorm" and "Crowstorm") are area spells that follow them and deal damage over time around them. Which means they will be wasted if the caster is blown away from the fight. Janna's ultimate ("Monsoon") is perfect for this; she is a famous counter to Kennen and Fiddlesticks in team fights only. Other champions with knock-back abilities: Alistar, Jayce, Gragas, Lee Sin and Tristana.
Katarina's ultimate ("Death Lotus") deals huge damage over 2 seconds around her. However, this is a channeled ability. Any crowd-control ability will stop it. Three out of Blitzcrank's four abilities can interrupt Death Lotus, especially his ultimate ("Static Field"), which is an instant and very safe way to disable Katarina. She cannot hope to land her ultimate in the middle of Blitzcrank's team.
Poppy's passive ability ("Valiant Fighter") reduces by half the damage taken from heavy hits (more than 10% of her current health). It makes her highly resilient to spike damage, such as Veigar's spells. However, she is very weak to damage-over-time spells (which are almost never affected) and true damage (which cannot be mitigated). Teemo, Darius and Olaf counter Poppy in top lane.
Some of Malphite's and Rammus' abilities benefit from armor ("Spiked Shell", "Defensive Ball Curl" and "Ground Slam"). They are more efficient against teams that rely a lot on physical damage. On the other hand, 50% of Galio's magic resistance is added to his AP ("Runic Skin"); therefore, he is better against teams that rely on magic damage.
"Yorick walks into a bar... There is no counter." (This is wrong, yet almost true, but I love this joke. Cho'Gath, Nasus and Trundle may benefit from Yorick's ghouls.)
These are only examples. They might even become outdated someday. However, what truly matters is the understanding of game mechanics that leads to these examples.
Always ask yourself "what makes this champion strong? what would stop it in its tracks?".
Bottom line: be your own LoLcounter.