def count_deck(deck: dict) -> int:
    """Count the number of remaining cards in the deck."""
    total = 0
    for card, card_item in deck.items():
        total += card_item['count']
    return total