create count_cards method