The issue is power projection. What the US Navy needs more of are cheaper, less powerful ships. Sending Arleigh Burke-class destroyers to protect ships from Somali pirates is a waste of resources, both in terms of what is committed to the effort and the need to build more Burkes to fill the inevitable gaps elsewhere.
Unfortunately, we seem to be incapable of actually producing such vessels, as too many of the people advocating for naval expansion are advocating for more of the big, over-capable ships (often for selfish reasons).
They tried with the Littoral Combat Ship (https://en.wikipedia.org/wiki/Littoral_combat_ship), but even when explicitly trying to design a ship that's cheap, easy to build and relatively disposable, they couldn't restrain themselves from larding it down with features until it was fat and expensive. And of course most of those features ended up not really working right anyway.
If we're talking anti pirate roles, we're talking jobs suitable for patrol boats. If we're including those, then we have way more than 300 ships already.
Unfortunately, we seem to be incapable of actually producing such vessels, as too many of the people advocating for naval expansion are advocating for more of the big, over-capable ships (often for selfish reasons).