Q: Why bother counting cards at all?

A: To hopefully make more money (or lose less) than we would otherwise!

Card counting theory suggests that we should have discipline over the size of our bets. Specifically, we should bet a larger amount when the count is positive and bet a smaller amount when the count is negative or zero. The rationale is that when the undealt part of the deck is rich in tens and face cards (i.e. the situation when the count is positive) the dealer stands a greater chance of busting because the dealer must hit until 17 or better while the player can choose to stand.

The card counting method implemented by this program assigns the value 1 to cards two through seven, 0 to the eights, -1 to cards nine, ten, jack, queen, king, and ace. So, in order to know the present count of the deck, as you watch the cards being dealt simply keep a tally in your head of the sum of the values for each card dealt (which will always be 1, 0, or -1 for any given single card).

What is the current count?

Correct! The count is

Incorrect! The count is

Finished! The count is always 0 when you get to the end of the full deck of 52 cards.