Honestly, I have no clue how it has worked. I just looked at the code and if the value of the rule type is not specifically one of MONITOR_RULE_TYPE_SINGLE, MONITOR_RULE_TYPE_AND_LIST, or MONITOR_RULE_TYPE_M_OF_N then this error is thrown. I don't see how your client code could have defaulted to one of these values before and not now. You might want to print out the value of the rule type from the uninitialized value and see what it shows. It probably defaults to the first possible value of MONITOR_RULE_TYPE_UNDEFINED which equates to zero in the enum.
I guess I don't understand your question about not knowing the number of monitors. You will have to know at least one or why would you be calling the set_monitor_associations() method in the first place? If at a later time, you need to add other monitors to the rule, you would call set_monitor_associations() again with the updated list of monitors. As for an ordering, I'm not sure if there is an enforced ordering in the monitor list. I believe they are just all executed and their successes are combined.
-Joe