It has a tetrapolar mating system with each cell containing two genetic loci (called A and B) that govern different aspects of the mating process, leading to 4 possible phenotypes after cell fusion. Each locus codes for a mating type (a or b) and each type is multi-allelic: the A locus has 9 alleles for the a type and an estimated 32 for its b type, and the B locus has 9 alleles each for both its a and b types. When combined this gives an estimated 23,328 potential mating type specificities. While all mating types can initially fuse with any other mating type, a fertile fruitbody and subsequent spores will result only if both the A and B loci of the merging cells are compatible. If neither the A nor B are compatible the result is normal monokarytic mycelium, and if only one of A or B are compatible, the result is either two mycelia growing in opposite directions (only A compatible) or a "flat" phenotype with no mycelia (only B compatible).
Correct, the downside is lots of nonviable offspring. I would guess the fungus needs to be able to colonize widely without sexual reproduction as well in order to take advantage of that rapid adaptation.
Hilarious as all the other answers are, my guess is that this species has more complex sex chromosomes than the XX/XY variations we're familiar with -- perhaps there are more than 2 slots for the chromosomes to go, and then there are more than 2 options per slot, resulting in the humongous number of options stated in the post.