No, blackjack card counting is not illegal, but it is highly discouraged by casinos. Online casinos have made it nearly impossible, so it is not effective with traditional online blackjack, but still possible to card count with live blackjack.