The name of this construction is Genitivkette (in English: genitive chain). Long chains are bad style, but a simple replacement of the genitiv by a von dem-dative construction is even worse style.
How do you do it better in English? The verbatim translation of your example is this sentence:
My friend’s mother’s house’s window …
First of all let’s make a whole sentence out of this fragment:
My friend’s mother’s house’s window is broken.
This is correct English, but bad style, and it is an ugly genitive chain.
One could try this:
The window of the house of the mother of my friend is broken.
That’s also correct English, but it is ugly and bad style too.
I guess in real life, you would say it more like this:
My friend’s mother has a house, and in this house a window is broken.
Die Mutter meiner Freundin hat ein Haus, und in diesem Haus ist ein Fenster kaputt.
It’s quite hard to tell the maximum length of a genitive chain. There isn’t any rule that limits the count. Even chains containing 20 limbs are grammatical, but a stylistic disaster.
I think, the limitation is similar to the English limitation. I consider two limbs as unsuitable but acceptable in some cases. For instance,
Das Auto der Schwester meines Freundes ist weiß. — My friend’s sister’s car is white.
Having three or more limbs, I’d suggest to consider rephrasing the sentence. For example,
Das Auto der Schwester des Freundes meines Bruders ist weiß. — My brother’s friend’s sister’s car is white.