When you play online blackjack, card counting is only allowed in live mode. If you do not use any software, card counting is not illegal per se.