When I was a high school student in New Jersey, the state legalized gambling in Atlantic City. As a math and games enthusiast, I was immediately drawn to the Blackjack tables and the prospect of gaining an edge over the house by counting cards.
I was never very good at it but I do hold the distinction of being ejected from a casino, not because I was particularly successsful, but because I was amateurishly consulting a poorly concealed cheat sheet.
Check out this video from the always excellent Wendover Productions, explaining how card counting works and how casinos stop you from getting away with it.