How many times is the image flipped (inverted) inside a standard Digital Single Lens Reflex camera?
The image forming lens flips the image once. For the imaging sensor, there is one flip.
The viewfinder is made up of a fold mirror, the one in the mirrorbox of the camera, a focusing screen, and either a pentaprism or two mirrors.
The fold mirror flips the image once, restoring it to "normal" parity. This means there are two inversions in a waist-level viewfinder.
The pentaprism/mirror flips the image a further two times and deviates it 90 degrees, giving two more flips.
As a result, the image is flipped four times between the lens and viewfinder.
The image forming rays from the camera’s lens are intercepted by a hinged first surface (reflex) mirror set at a 45⁰ angle. This first reflection rights the upside down image, but, being a mirror image, it is reversed right for left. This image is projected onto a viewing screen. The bottom side of this screen has been roughened by scrubbing it with fine sandpaper or a chemical etch to give it a “tooth”. Thus the bottom surface is nontransparent. This surface allows the image forming rays to be scrutinized with amazing clarity. The image however is flawed; it is has a vignette (dimmed edges), and it is reversed left to right. Atop the ground glass view screen is a Fresnel lens. This is a thin lens consisting of concentric rings which are each a segment of a lens. The purpose of the Fresnel is to mitigate the vignette.
The position of the viewing screen is convenient if the camera is held at waist level. Photographers prefer to work with the camera held at eye-level. To accomplish this, a five-sided glass prism called a pentaprism is mounted atop the view screen. The pentaprism reflects the image of the view screen twice. This action flips the image left to right and redirects the image 90⁰ so that it can be viewed from eye level. A viewfinder eyepiece allows the image on the view screen to be seen by the photographer.
Note the word “reflex” is Latin for “to bend back”.