Add max entity count setting.