Counting cards IS perfectly legal.
The casinos really ought to leave card counters alone. Being skilled shouldn't be penalized. If you're good at something, you ought to be allowed to make a living from it.
And as I understand it, very few people who try counting are successful at it. The unsuccessful ones lose, and the casino makes money. That seems to me to be a reasonable tradeoff.
Bridge players always count cards, and nobody gets all upset about it. Of course, they're only dealing with one deck, so it's much easier to do.