You need an equation of state. Let's assume that we're dealind with ideal gas mixture so we get: P*V=n*R*T. R is a constant and since you ask about the pressure, I'll assume that you keep the volume constant, so V is also a constant. Now you need to write the equation down for the before/after case, say with subscript 1 for the reactants and with subscript 2 for the products:

P1*V=n1*R*T1 and P2*V=n2*R*T2. Now you divide them, cancel off the constants and you get: P2/P1=n2*T2/(n1*T1). Wikipedia tells me that if I burn hydrogen at the stoichiometric ratio with pure oxygen starting at 20 C and a pressure of P1=1 bar I'll, get a flame at 3200 C (look for adiabatic flame temperature). So this is an increase in temperature by 3180 K. Also, you go from 3 moles down to two so there's: T2=3180*T1 and n2=2*n1/3. BTW, we usually talk about moles, not molecules but they are essentially the same thing since a single mol of a substance contains an amount of molecules equal to the Avogadro number, which is a constant. So now by substitution we have: P2/P1=3180*2/3.

So you see that the rise in temperature incresed the pressure by a factor of 3180 whereas the fewer amoumt of molecules in our theoretical non-expandable perfectly isolated box only led to a pressure drop by a factor of rougly 0.67.

However, at the resulting pressure of about 2120 bar (!) it's not correct to use the ideal gas equation, but you see where this is going. The temperature increase wins by a longshot in this case, and I would expect this to be so for any reasonable fuel combustion.