There were five. The fifth was the Zuiho. It approached from the Southwest and was part of the main invasion force.
yes, thank you.
There were four at the actual battle of Midway, the 4 that that USA killed.
So it is correct to say there were 4 Japanese carriers in the active battle zone
Zuiho — and the main invasion force — never got close enough to the actual kill zone where the combat took place
the US admirals withdrew back towards Pearl Harbor to avoid a night engagement on June 4th
The Japanese advanced with the main fleet briefly during the night — hoping to lure the US carriers —
but IJN realized their battleships and any carrier with the main invasion fleet would be vulnerable to both the US carriers as well as the attack aircraft on the atoll — so they slunk back to Japan at daylight on June 5