Fix counting of remaining uploads

Fixes #20