changed object_counter to use safe_static_init