There are 39 nations operating a total of 400 diesel electric subs. Only three of these nations (China, Iran, North Korea) are likely to use their subs against the U.S. or its allies. China has fifty of these boats, Iran has three (plus 25 much smaller mini-subs) and North Korea has 20 (plus 50 much smaller mini-subs). So the U.S. has to worry about 73 diesel electric subs and 75 mini-subs. But about half the full size subs are elderly, obsolete, and noisy. The same can be said for at least half the mini-subs. That leaves about 36 full size subs and 40 mini-subs that are a clear threat (though the older stuff can be a threat if you get sloppy). That’s a lot of subs, and they make the East Asian coast and the Persian Gulf dangerous places for American warships.
For much of the past decade the U.S. Navy has been trying to get an idea of just how bad the threat is. Thus from 2005 to 2007 the United States leased a Swedish sub (Sweden only has five subs in service) and its crew, to help American anti-submarine forces get a better idea of what they were up against. This Swedish boat was a "worst case" scenario, an approach that is preferred for training. The Gotland class Swedish subs involved are small (1,500 tons, 64.5 meters/200 feet long) and have a crew of only 25. The Gotland was based in San Diego, along with three dozen civilian technicians to help with maintenance.
For many years before the Gotland arrived, the U.S. Navy had trained against Australian diesel-electric subs and often came out second. The Gotland has one advantage over the Australian boats because of its AIP system (which allows it to stay under water, silently, for several weeks at a time). Thus the Gotland is something of a worst case in terms of what American surface ships and submarines might have to face in a future naval war. None of America's most likely naval opponents (China, North Korea, or Iran) have AIP boats yet, but they do have plenty of diesel-electric subs which, in the hands of skilled crews, can be pretty deadly.
Based on the experience with Australian and Swedish subs, the U.S. Navy has been developing new anti-submarine tactics and equipment. All this is done in secret, obviously. But apparently the modern, quiet diesel electric boats continue to be a major threat to U.S. surface warships and subs. Meanwhile, potential enemies build more of their cheaper and higher quality diesel-electric boats and train their crews by having them stalk actual warships (including U.S. ones). The subs are getting more numerous, while U.S. defenses are limping along because of the sheer technical problems of finding quiet diesel-electric boats in coastal waters.
One reason China wants to keep American naval forces out of their economic zone (which does not bar foreign warships) is so that Chinese diesel electric subs can train without being stalked by American subs, surface ships, and aircraft looking for realistic practice tracking Chinese boats. At the same time the U.S. Navy has lost the full use of its most effective underwater anti-submarine training area (a well mapped and instrumented area off southern California) because environmentalist activists have convinced judges that the use of active sonar in this training area is harmful to some species of aquatic animals.
Moreover, the North Korean and Iranian fleets (and governments) are in decline, while China is pouring more cash into their armed forces. If there’s any diesel-electric boats the U.S. Navy has to be extremely concerned about, it’s the Chinese. While China continues to try and develop world class nuclear subs, they are also moving ahead in creating world class diesel electric boats.