getMaterialsCountByStructures method updated