Add ddt_object_count() error handling