Given that the Philosopher's Stone is a unique and incredibly valuable object, Harry is obviously using a rhetorical device called "hyperbole" to describe how very certain he is (e.g. "I'd bet twelve of something insanely valuable that x has happened").
That being said, for me the more interesting question is precisely why Harry chose the number twelve in the first place. The answer to that is that JKR is very fond of the number 12 as a modifier. She tends to use it whenever she means "a lot" and not just in the HP novels, but in her other writings as well.
...“Professor Dumbledore is particularly famous for his defeat of the
dark wizard Grindelwald in 1945, for the discovery of the twelve uses
of dragon’s blood and his work on alchemy with his partner, Nicolas
Flamel” - HP:PS
and
‘You’re worth twelve of Malfoy,’ Harry said. ‘The Sorting Hat chose
you for Gryffindor, didn’t it? And where’s Malfoy? In stinking
Slytherin.’ - HP:PS
and
‘What’s been going on?’ said Ron. ‘Why haven’t you been answering my letters? I’ve asked you to stay about twelve times, and then Dad came home and said you’d got an official warning for using magic in front of Muggles …’ - HP:CS
and
‘Journey all right, Harry?’ Bill called, trying to gather up twelve scrolls at once. ‘Mad-Eye didn’t make you come via Greenland, then?’ - HP:OotP
and
Professor Trelawney broke into hysterical sobs during Divination and announced to the startled class, and a very disapproving Umbridge, that Harry was not going to suffer an early death after all, but would live to a ripe old age, become Minister for Magic and have twelve children - HP: OotP
and
Snape’s wand flew twelve feet into the air and fell with a little thud in the grass behind him. Sirius let out a bark of laughter. - HP:OotP
and
‘This isn’t your average book,’ said Ron. ‘It’s pure gold: Twelve
Fail-Safe Ways to Charm Witches. Explains everything you need to know
about girls - HP:DH
and
She was not going to beg. She had emptied the inbox of twelve spam emails before he spoke again, his voice heavy. - Career of Evil (as Robert Galbraith)
and
Jago Ross: in every respect the antithesis of Strike: handsome in the manner of an Aryan prince, possessor of a trust fund, born to fulfill a preordained place in his family and the world; a man with all the confidence twelve generations of well-documented lineage can give. - The Cuckoo's Calling (as Robert Galbraith)