Actually, total internal reflection of sunlight is impossible in spherical raindrops. The sunlight enters the drop at less than the critical angle, and symmetry makes it strike the boundary at the same angle it had when it entered. An internal reflection occurs, but it is not total and a fraction of the light exits while the rest reflects. The same fraction exits each time the reflected light hits the boundary, decreasing the internal light each time.
The rainbow is not just an arc, it is a full disk. The disks are sized differently for each color, and are brightest at the very edge, which is what makes the colored arcs appear. The colors are not reversed because of the number of reflections, but because of the size of these disks.
For the primary rainbow, the disks are centered at the anti-solar point, which is the point you'd see looking directly away from the sun. The violet disk is 40 degrees wide (measured from the center), and the red disk is 42°, so the red arc appears outside of the violet.
For the secondary, the disks are centered on the sun - away from the direction you are looking when you see it. The violet disk is 127° wide, and the red disc is 130° wide. Because they are more than 90 degrees - in the second quadrant - these disks wrap around the zenith, so that you see the secondary's colored arcs in the same direction you see the primary's arcs. Technically, the red arc is still outside of the violet arc, but you see them reversed ("outside"="down") because of this wrapping.
For higher orders, the red bow is always on the "outside" of the bow, but that can be "up" or "down." Red is "up" when it is in the first or third quadrant, and "down" in the second or fourth. For example, the tertiary is centered away from the sun, and about 220° wide. Because this is in the third quadrant, it actually wraps around the sun as well as the zenith, and "outside" is again "up." The theoretical (it is so faint that it is obliterated by light that exits without reflection) 12th order bow is the first to break the pattern of odd-order being red-up, and even-order being red-down.
Edit: Here's a diagram that shows how light deflects after one (lower curves) and two (upper curves) internal reflections. An input angle of 0° means light that hits a raindrop dead-center; 90° hits on the edge. A deflection angle of 0° is straight back toward the sun, and 180° is away from the sun. (Yes, the same direction as the original light. Physics texts will usually reverse that, but this system is easier to understand for primary and secondary rainbows.
The colored arcs are an intensification of each color at the maximum or minimum points of each curve, caused by a much wider range of input angles contribute to similar deflection angles. The order you see the colors is simply the order of those maximum or minimum points.