You will have racking losses.
If you want to end up with a full five gallons to serve, figure on 0.25 gallons of loss each time you transfer.
You would want to have at least 5.50 gallon in your primary fermenter. Depending on how much trub is brought in from your kettle, maybe 5.75 gallons. Figure on at least a 6.5 gallon fermenter to allow for krausen build up. Using Fermcap in your fermenter might allow you to use a slightly smaller fermeter, but I would not go any less than 6.5.
6 gallons for a secondary would be fine. Many people talk about too much headspace, but there is still yeast involved, creating a blanket of CO2 to protect the beer.
You can use a 5 gallon carboy to secondary, but you will not get a full 5 gallons to bottle or keg.