Usually (work in charity events) we’d ask for them as early as poss but with a week to go as the final deadline. It’s not unusual for guests to drag getting this info to you or change who they are bringing if they’ve bought a whole table so the venue usually asks for final numbers and dietaries 3-5 days ahead of the eventDietary requirements would be needed much much sooner than 4 days before, I know that much from planning a wedding!
To add to that though - my god you better hope you’ve got your photographer and auction items lined up well before this……??!!