now counting upload attempts. not smoke-tested