The Fundamental Theorem of Card Counting with applications to Trente-et-Quarante and Baccarat