Template:Custom card count

This template returns a count of cards matching the same criteria as Custom card table. It also sets a variable for ease of retrieval of the count later in the same page without repeating the entire template call.

This may be useful directly in strategy descriptions or mechanics notes, but can also be used with DrawChance or DiscoverChance to generate dynamically updated probabilities.

Usage
See Custom card table for most parameter/syntax documentation.

To use variables after an initial call to this template on a page:
 * produces the same value as the previous call to this template that used.
 * produces the same value as the previous call to this template that used.
 * produces the same value as the previous call to this template that used  or any other format, including no format at all.
 * Note that if multiple template calls are used in the same page with the same, these count variables will always refer to the most recent template call of the corresponding format, which may have had a different count than earlier queries.

Note that unlike Custom card table, this does not have type-specific versions like Custom minion card table for minions, spells, or weapons. (Those alternates are used because they make good choices about table columns, whereas this template does not make a table at all.) Make sure to add  (or weapon or spell) to the parameter list if adding this template and copying parameters from one of the type-specific templates.

Examples
produces.
 * produces, the number of weapon cards only available in Wild format play.
 * produces.
 * This is the number of different mage spell cards that could be produced by Primordial Glyph or Cabalist's Tome when cast by a mage in Standard format.
 * This is the number of different neutral or priest minions with cost (8) or higher in Wild format, which is the card pool for Free From Amber if cast by a priest.
 * produces again without re-querying, from the Standard format mage query above.
 * produces again without re-querying, from the wild-exclusive weapon query above.
 * produces again without re-querying, from the Wild format Free From Amber query above.
 * produces, the number of 10-mana minions in Wild format (the most general format since "potato" is not valid).
 * produces again without re-querying. The result from the Free From Amber count has been replaced with the the more recent one from the 10-mana minion count.