I think you're asking the wrong question - I don't think you'll ever find anything on a statue book to say that card counting is illegal, but more likely it'll be something along the lines of cheating is illegal - and it then becomes a point of interpretation of the law as to whether card counting is cheating or not.
In the UK, the most recent revision of the Gambling Act now states that cheating is an offence under the act, but it doesn't define what constitutes cheating - just makes some woolly reference to what might reasonably be considered to be cheating. And then there's the issue of what can be proved beyond reasonable doubt and what is circumstantial? So interfering with cards in a casino (marking or warping) would be - something that can be proven using security footage, the cards etc - but counting would be much harder to prove.
All IMHO of course.