Adding one more overload for discover_counters, fixing existing discover_counter functions to properly handle the error_code