Calories burned are directly related to average watts during the climb which depends on how fast you climb the hill. If you climb at the same speed then your average power for the climb is the same and it doesn't matter whether you achieve that speed by spinning fast in easy gears or plugging away in harder gears.
To maximize both training stimulus (power) and calories burned you should climb at the highest speed you can actually sustain on the climb without blowing up, your choice of gears and leg speed should be based on what allows you to climb steady and fast. That assumes a fairly long climb, if the climbs are short as in a minute or two to the top, then ride them at solid but steady intensity but not full out make ya puke sprinting or you're likely to give up after one or two short climbs and end up training less and burning fewer calories because you give up after the first couple of all out climbs.
IOW, ride steady and hard but at a sustainable pace and you'll both burn calories at a fast rate and sustain the effort long enough to burn more total calories per session. But regardless it isn't cadence or gear choice that directly dictates power but rather overall climb speed in whatever gearing choice allows you to sustain those speeds.
-Dave