count fix to end writing of last file from db correctly

This can probably be handled a bit more gracefully but right now you
must uncomment an additional query in the sqlprocessor.java file in
order to get a count of the remaining articles and be able to account
for the last article in db.