Blackjack is an oddball game which involves skill and chance. But chance dominates such that it's still likely considered a game of chance.
Skill in blackjack is to play a perfect game. That is, you don't make errors. Counting cards may be considered part of playing a perfect game.
The rules of Blackjack set the house edge. In some cases, a perfect game (including counting cards) could elevate the player such that the player has a small edge. In that case, the player may come out ahead and the casino may eventually stop working with that player. It's rare that a casino hands this to the player as an option though AFAIK. I have heard of casinos negotiating rules with "whales."
Usually, a perfect game won't elevate a player above the line of house edge. Among the rules which narrow the edge is shuffling with multiple decks of cards. If the casino is using multiple decks, then card counting is useless.