Card Counting
Card counting is a strategy the players use to determine when they have the best probability advantage. Card counting can be used in almost every betting game that involves cards, but most of the time it is used in blackjack.
Most people think that in order to count cards you need savant qualities, but the truth is that card counting isn't only about memorizing specific cards but about assigning heuristic point score to each card and then tracking the total score.
The basic thing in card counting is to track the relationship between high-value cards and low-value cards. High value cards are better for the players while low-value cards are a lot better for the dealer. By controlling this information, the player gets the advantage in his bets. This advantage can be very important although it doesn't give the players automatic winning edge on every hand.
History
The first person to write about card counting was the American mathematician Dr. Edward O. Thorp. Thorp wrote a book by the name of Beat the Dealer in which he outlined various betting strategies for a better game of blackjack. In his book, Thorp showed how some cards are favorable to the player while others are better for the dealer, and how knowing those cards can determine the outcome of the game.
During the 1970s and 1980s more advanced methods of card counting came into favor. Various systems like Ken Uston's 'team play' became known among blackjack players and many other systems and ideas were developed and tried in casinos.
Legal Status
Card counting is not legal. However, if you're using only your brain to count the cards, it might be allowed in some places.
Computerized devices to count cards aren't allowed in any casino in the world and if you're using one while playing blackjack, you're risking yourself. In Nevada casinos, you might get kicked out of the casino if you'll use card counting. In Atlantic city casinos, card counting is allowed by law, but the casinos are responding to that with several changes like using 8 decks in a game, lower deck penetrations and so on.