The answer is a tricky one because of two sticky points. The definition of a "ship" varies somewhat, and "at Midway" is also subject to interpretation.
The United States had 3 aircraft carriers and about 20 - 25 support ships. About 18 US submarines were also thought to be in the area, but they were used as picket vessels and did not engage the enemy.
Japan had a strike force with 4 aircraft carriers, plus about 15 support ships. All of these were in the battle. Japan had at least one submarine, but likely many more were in the area. There was a Japanese invasion force which was held back during the battle, which had two light aircraft carriers, 4 battleships, and about 41 support vessels.
After the Battle of Midway, the damaged US carrier Yorktown was sunk by a Japanese submarine. The destroyer Hamann was also sunk. Five other destroyers involved in towing and protecting Yorktown were undamaged.
The total number of ships involved in some way around Midway would be about 115; but those closely involved in the battle would be only about 12 (seven carriers, three cruisers, two submarines).
See website: Battle of Midway
See website: Battle of Midway
See website: Battle of Midway
No ships of the Royal Navy took part in the Battle of Midway. It was fought entirely by the ships of the U. S. Pacific Fleet.
See website: Battle of Midway The Enterprise, Hornet, Yorktown and Lexington.
The Battle of Midway was aircraft against ships.
See website: Battle of Midway
See website: Battle of Midway
See website: Battle of Midway
No ships of the Royal Navy took part in the Battle of Midway. It was fought entirely by the ships of the U. S. Pacific Fleet.
See website: Battle of Midway The Enterprise, Hornet, Yorktown and Lexington.
See website: Battle of Midway The Lexington was the only ship lost by the U.S. during the battle in the Coral Sea.
Midway Island, and a bunch of ships in our Navy's task force.
Quite possibly none. -The Battle of Midway was an entirely naval battle fought only between ships and aircraft.
5 IJN and 2 USN.
The US Navy at Midway had 3 carriers, about 50 support ships, 233 carrier aircraft, as well as 127 land-based aircraft.
The U.S. naval forces at Midway consisted of 3 aircraft carriers, 8 cruisers, 16 destroyers, and 19 submarines.