"Grand is used in a specialized sense in kin terms like grandmother or grandson to indicate a further degree of lineal distance beyond that expressed in the head. Such forms can themselves be modified by great (with the same meaning) in a morphological construction that is recursive: there is no linguistic limit on how many great's are permitted in compounds like great-great-great-grandmother." (G.K.Pullum & R. Huddlestone, 2002)
The example is very good explained, however, what I could not understand is if we should consider the word grandmother as a compound or not. Since grand is attached to other bases, I thought that the option to consider grand as a prefix should not be avoided.