you are allowed to count cards at most (all?) casinos in the usa.
It's legal, but if you're too successful, a lot of casinos will show you the door, sometimes preventing you from converting your chips back to money. See https://youtu.be/rjfLuM-Pqr8
Except when it's blackjack and you're counting cards.