You get credits for the number of nights you are staying, not days. For instance, if you check in on a Monday and leave on Fri., that is 4 nights stayed - you get 4 TS, 4 CS, 4 snack credits for each guest in your room.
When you check in, you will be given your room key so that you can get into the parks ASAP (whether your room will be ready or not is another story), and that card will have your dining credits loaded on it. They are available immediately - in fact, we went directly from the check in desk to Columbia Harbour House for lunch our last trip.
The key with your tickets and dining credits is good the entire last day of your trip. If you are still there, have credits left at 8pm, and go for dinner, you will still be able to use them at that point. They expire (I think!!) at midnight that night.