No, card counting is not illegal. However, casinos discourage this practice and may ask players to leave if caught.