How many times has the matter in our solar system been recycled from previous stars?
A very qualitative way to look at it:
- The Earth, and therefore you are formed of the same material that contributes to the metallicity of our Sun
- Our Sun is a population I star, which means that it has a relatively high metallicity indicative of having formed after the heavy and short lived stars of population II had already had their big blow offs.
- The population II stars divide into early and late groups, and all post-date the assumed population III stars.
From this I conclude that a non-trivial number of the nucleons in your body have been part of a few stars. Maybe as many as five. As Georg notes there has been time for the most prolific path to include many stars (dozens?).
Certainly all the carbon, nitrogen, oxygen and trace elements that make up your body have been part of at least one star.
None of these facts shed much light on the average star-membership-history of the nucleons that make up your body.
The "generations" of the stars are surely not as sharply separated as you suggest. It's true that the percentage of heavier elements - or "metallicity" - is increasing as the stars continue in their thermonuclear fusion. But most of the stuff that our Sun burns is still Hydrogen - and it's the same "initial generation" Hydrogen as any previous stars were using. Stars are being born continuously and the metallicity is usually a little bit higher than for the previous star.
In the era of "nucleosynthesis" that ended about 3 minutes after the Big Bang, mostly light elements were created in a thermal equilibrium at huge, "nuclear" temperatures that existed at those times. A good theory of nucleosynthesis predicts that most of the elements in the Universe should be hydrogen, with a smaller amount of helium and some trace amounts of lithium and other elements. The observations confirm that the predictions are pretty much accurate.
Heavier elements were created in previous stars. But it is not correct to suggest that the Sun is "almost entirely" built out of a recycled material. Quite on the contrary: it's more accurate to say that the Sun is mostly built from the hydrogen that was created in the first minutes after the Big Bang - and it is also "contaminated" by metals and other heavier elements from the previous stars. Those impurities are important for our life - and industry - but they're not important for the ability of the Sun to burn.
Its likely a complicated mix, possibly including some virgin material, clouds of which occasionaly are absorbed into the galaxy, and some material that may have multiple recyclings. And not all the material that goes into a star is reacted before its blown off, so some (maybe much) of the hydrogen in the sun could have once been in the outer layers of another star. And even some first generation starts (pop III) that were low mass still haven't completed their lifecycles, so it is just a chaotic mess of gas and dust that gets pushed around by gravity and stellar winds for billions of years, plus some new gas that has recently fallen into the Milky Way all mixed up, but not so well mixed up as to be of uniform composition.