I'm a bit puzzled why you're asking about a DUI in 2004, but to answer your question, the 2004 DUI would definitely be counted as a second conviction, since the 1994 DUI occurred less than 10 years prior. In fact, even if the DUI had occurred more than 10 years earlier, but you entered the ARD program less than 10 years prior it would still be considered a first DUI conviction. (It should be noted that an ARD is not a conviction, but is considered a conviction for purposes of determining what mandatory sentence that applies)
When the first DUI occurred, the look back period was only 7 years, but regardless of what anyone may have told you at the time, the law was changed several years ago to increase the look back period to 10 years.
If the new law, changing the "look back" to 10 years, had gone into effect before you got the DUI in 2004, then the prohibition against ex-post facto laws would not be violated. The idea is that you should have known the look back had changed to 10 years when you committed the 2nd DUI. The law also presumes that you knew what the law was.
Sign up to receive a 3-part series of useful information and legal advice about DUIs.