Fixed some bugs in management of IngestJob task counter