Fix bug: correctly count nanopubs when publishing them