I am seeing this on DHIS2 2.40.0:
import_response_ok assumes that the number of imports can be found through response['importCount']
Unfortunately, this has apparently been changed to response['response']['importCount'].
(There two responses, the parameter-name of import_response_ok and the element returned by the api ....)