Counting cards is illegal in blackjack because the house advantage is too great. The house edge in blackjack is 2.36% and counting cards increases the house edge to 2.59%.
In other words, for every ten hands played with counting cards, the house will win 2.59 hands.