reverted rule_count back to size_t, as it is passed as pointer (fixes 64bit issues)