As far as the criminal charges go, you would have had to been convicted of the first BEFORE you committed the second to trigger the second DUI penalties. Of course, the fact that you did have other offenses can certainly sway the judge to any discretion he has in meting out the actual sentences.

As for the DMV, this will however count as your second refusal which will trigger a longer suspension.