There are four places where we bow at the beginning or end of a blessing. Every time in the day that we reach those four places, we bow. It can be 3 times personally (up to 5 times on YK) plus our response to the Chazan repeating one of those places.
The correct places to bend the knees and bow the head (and spine, unless one is elderly or weak) are as follows(Shulchan Aruch 113/1):
(1&2) the first blessing of the Amidah, the blessing of the "Avot" [forefathers], beginning and end: when saying the words "Baruch" [bend the knees] "Ata" [bend the head and spine] " then stand erect slowly as one says "haShem [and continue with "Elokeinu..."] and the same by the ending: "Baruch" [bend the knees] "Ata" [Bend the head and spine] then stand erect slowly as one says "haShem," and conclude "Magen Avraham."](Shulchan Aruch 113/6,7)
(3&4) the next to last blessing of the Amidah, the blessing of Hoda'ah [thanksgiving], beginning and end: bow the head and spine quickly "like a bulrush"(see Mishneh B'rurah 113/12) when saying the first five words, "Modim anachnu lach shaw-Ata hu..." And when saying the words "Baruch," bend the knees, when saying "Ata," bend the head and spine, then stand erect when saying "haShem" [and conclude the blessing with "haTov shimcha, u'lcha na'eh l'hodot."]
It is inappropriate to bend the knees at the beginning or at the end of any other blessing, including the last blessing, "haMevorech et Amo Yisrael ba'shalom."
However, we do bow as we walk back 3 steps, "like a bulrush," for oseh shalom. Then, we bow to the left, then to the right and then forward, but no knee bending. Rabbi Heinemann of Baltimore said (asked personally today) that there is no issue of bending the knees when one does this last k'ree'ah. It is the same as the k'ree'ah of Modim.
Finally, the Modim D'Rabbanan is said when we join the Chazan as he repeats the regular Modim. That counts as the 3rd place for which we bow. (The issue is not how many times rather how many Places we bow!) There are 3 different customs on how long to bow this time (see ShA 127/1 and Rema there) but the prevalent one in many circles is to follow the Vilna Gaon (Bi'ur HaGra, quoted in Bi'ur Halacha, 127 "hakol b'sh'chiyah" ) that we bow again "like a bulrush" for only the first 5 words and lift our head slowly as we say "haShem."