It's not always directly counted, but we count CO2 concentration in the atmosphere to check CO2 emissions and we're able to attribute a large part of these emissions to countries. It's why it takes a long time to have accurate data on CO2 emissions. I'm not sure we even have the data for 2025 yet, they're usually released at the end of the next year. So obviously for 2026 it's only a vague estimate, we'll know at the end of 2027.
Burning a refinery likely reduces emissions, because the fuel this refinery produced would be burned anyway, and the destroyed refinery will cease producing fossil fuels. So it wouldn't be a surprise if all the refineries destroyed this year in Russia and in the Middle East contributed to a reduction in CO2 emissions.
I wonder whether burning the refinery is better than burning the fuel efficiently since you get more soot.
Nitpick, some of the refineries products (~10-20%) are not burned but used to make plastics and other chemicals. I agree though, the effect of destroying the refinery, pushing up prices thus reducing demand dominates.