If I am making an animation loop that is 40 frames and I start it at 0, do I need to end it at 39 or 40 to make it loop right?
Another way to ask the question might be, does the last frame count as a frame?
In short, yes. Frame 40 does count as a frame, unless you specifically tell the timeline or NLA editor to ignore it.
If frame 40 smoothly leads into frame one, you should only need to render frames 1-40. Blender defaults it's render to start at 1. Basically if frame zero is the same as 40 you can start your render at on frame one.