First of all, there's two things you need to understand: First: There's no way for the game to know the actual value of the cards.
There's no practical use to this mod, but it may be used as base to build card game mods. 'It's doesn't matter if a joker is played you just get a new one.' deck of cards and shuffles them or pretends to play with them and puts them. This is a simple example to show the script used to count cards.