A standard tarot pack has seventy-eight cards: twenty-two trumps, now called the major arcana, and fifty-six suit cards in four suits of fourteen, ace through ten, plus page, knight, queen and king.
The structure is Italian and fifteenth-century, and it was made for a card game. Tarot begins as tarocchi, a trick-taking game in which the trump suit is a permanent one, and the game is still played in parts of Europe. The earliest documentary references to trionfi decks are from Ferrara and Milan in the 1440s. The Visconti-Sforza cards of about 1445 to 1460 are the most famous survivals, but no complete deck of them exists, they are reconstructed from fragments held in several collections, and they cannot be used to establish a count. Deck sizes varied: two decks documented at Ferrara in 1457 had seventy cards.
The earliest source that lists all twenty-two trumps is an anonymous Franciscan sermon against gambling, the so-called Steele Sermon, datable to roughly 1450 to 1480. The earliest explicit attestation of a seventy-eight card structure is the tarocchi poem of Matteo Maria Boiardo, written at Ferrara between 1461 and 1494 and printed in 1523.
The divinatory use is much later and French. Antoine Court de Gebelin published an essay in 1781 asserting that the tarot preserved Egyptian priestly wisdom, an assertion for which he offered no evidence and which was false; Jean-Baptiste Alliette, writing as Etteilla, produced the first deck designed for divination shortly afterwards. Everything that follows, Levi, the Golden Dawn, Waite and Smith in 1909, descends from that eighteenth-century reinvention, not from the fifteenth-century game.