It is true to say that it was the publicity generated by card counting that made blackjack such a popular casino game. Before then the game was less popular than craps, and in fact was mainly played by blackjack aficionados.
It was Edward Thorp who spilled the beans on card counting in his famous book on the subject. Thorp was a mathematician and he proved that theoretically card counting would beat the casinos. One might wonder why he did not go out and put his theories into practice rather than produce a book that publicised the technique to everybody, but the fact is that he did try to do it himself but he found that he was not very good at it. Performing card counting in a real life casino is much more difficult than understanding the theory of it. However, those who could do it learned to do it well and at considerable expense to the casinos.
Many stories have been told of the card counters and the riches they accumulated, of how the casinos fought back with measures both legal and (in the early days) suspect. Whether or not card counters were taken to a back room and presented with a face full of knuckle dusters remains contentious, but in the end it was a battle that the casinos won.
But this is not what the casinos want you to believe. In fact they want you to maintain a faith that there is a possibility that blackjack card counting is a way to beat the casino, because it is this belief that keeps people sitting at the blackjack tables. They are fully aware when anybody is card counting. The blackjack dealers are all trained in this art and are themselves quite able to keep tally on when the deck is hot and when it is not. They can chuckle to themselves when amateur counters suddenly raise the level of their bets, or new high rollers sit at the table. Nowadays, the more who try it, the greater is the flow of money in the casinos direction.