Merge "Count error document to complete adding documents to the database." into nyc-dev
am: 127549b

* commit '127549b5f5747402813f00620f06fdd4ae9b4d96':
  Count error document to complete adding documents to the database.