Now setting the number of failed parts

This is an attempt to speed up queries on large number of imports