When a foundation chain requires many stitches, I find it easier to make the chain adding 5-10 extra stitches, then hook a holder (I use a paper clip for this) on the last chain and break off the thread. For the first pattern row, I start crocheting back at the very first stitch of the chain. If I’ve made a mistake counting stitches, it is a simple matter to add or remove stitches from the live end if needed. No more ripping out and starting anew if the foundation chain was wrong.
attach holder here and break off yarn
begin row 1 from this end, where chain was started