Germany and it's not even close. There were more U-boats commissioned than allied submarines from all nations combined.
The RN had the greatest number of surface ships, the USN the highest gross surface tonnage (they were more into BIG boats, especially aircraft carriers). But the Nazis had the biggest numbers beneath the surface.
Yep. Though the Japanese had better torpedo technology.
But the Japanese submarine strategy was different from the German's, which is why they didn't have as many submarines. They viewed them more as scouts and pickets, than something to be used to hamper merchant traffic.