Counting cards in blackjack is not illegal but is frowned upon by casinos. It involves keeping track of the ratio between high-value cards (10s and Aces) and low-value cards (2-6). Skilled players may use this information to adjust their bets accordingly when they have an advantage over the dealer. However, most casinos have measures in place - such as using multiple decks or shuffling frequently - which make card counting difficult.