Im pretty sure it is proportional to the amount of provinces you had. Also, one family member can only have a maximum of 4 (I think) and wont have any kids afte4r this even if they are a crazy adulterer and master of fertility.

unrest is effected by traits, culture, army strength in the town and distance to capital. buildings can add law, happiness, or order (these are usually temples or field of games etc).