small fix in upload script
The upload script is counting how many previous test results were uploaded to determine the "run-number" of the current upload test run. We found a case when a previous test result was messed up and it's preventing the script from running. This MR is trying to fix this.