Make cc.generic.number_of_workers overridable

[#76818254]