No. Infantry and mechs are ground forces, not ships, so they do not count against fleet pool.
Fleet pool limits only non-fighter ships in a system. Ground forces in a space area count against capacity instead. A specific ability can treat a ground force as a ship; check that card if it says so.
LRR v2.0 (base game / Prophecy of Kings); specific card abilities may override the general rule.