calculating effective number of children