Scott Cousins scored the winning run in the 12th inning, and the Marlins beat the Giants 7-6 on Wednesday night after blowing a four-run lead in the ninth.