function to calculate total of cards in blackjack