The 8400F has 20 PCIe lanes but only 16 are available as 4 are reserved for the DMI link to the chipset.
https://www.amd.com/en/products/processors/desktops/ryzen/8000-series/amd-ryzen-5-8400f.html
Further as @elstaci points out, only 8 lanes can be accessed by the PCIe graphics slot as this is a limitation on all Phoenix processors (8700G, 8600G, etc.) of which the 8400F is in the same family.
This leaves 8 PCIe lanes remaining which can be used for two x4 M.2 drives if available on the motherboard.
https://www.anandtech.com/show/21242/amd-ryzen-7-8700g-and-ryzen-5-8600g-review
Ryzen R7 5700X | B550 Gaming X | 2x16GB G.Skill 3600 | Radeon RX 7900XT
Ryzen R7 5700G | B550 Gaming X | 2x8GB G.Skill 4000 | Radeon Vega 8 IGP
Ryzen R5 5600 | B550 Gaming Edge | 4x8GB G.Skill 3600 | Radeon RX 6800XT