It would count as a link. However, google would know that they both have the same IP and are therefor owned by the same people. So a factor would be added to water down the link because of that. If you just do a few links - no problem. But if you fully interlink every page, then google will just assume they are the same site. You can avoid this a bit by puting each site on different IP's (different web hosts). However, if you over interlink, google still assumes something odd is going on.
Linking 2 sites that you already own is a very good idea though. If will kick start the new domain and get it some traffic an hopefully some PR of it's own. Just keep it to one or two links - not dozzens or hundreds.