How many 8x8 JPEGs exist with distinct DCT given a quality level?
Well, $8\times 8$ is simply 64 individual values. 

Now, if you had a quantization matrix $Q$ (dimensions $8\times 8$) with all $1$s, you'd have 8 bit to spend on every entry in your DFT, so that's 

$$(256)^{8 \times 8}=({2^8})^{(8 \times 8)} = 2^{512}$$

possible different DFTs.

Now, typically, that's not happening, since quantization matrices restrict the possible values that can end up being non-zero.

The number of possible values is relative easy to figure out: You take the maximum value for each entry, 255, and divide it by the quantization matrix value, round that down; that leads you to the number of possible combinations being

$$ N = \prod_{i = 1, j = 1}^{8,8} \left\lfloor\frac{255}{Q_{i,j}}\right\rfloor$$