         NSLog("Status change: " + status)
 
         dispatch_async(dispatch_get_main_queue()) {
+            var newStatus = ""
+
             if(total > 0) {
                 self.progressView.progress = Float(count) / Float(total)
                 self.progressView.hidden = false
+                newStatus = status + " (" + String(count) + "/" + String(total) + ")"
             } else {
                 self.progressView.hidden = true
+                newStatus = status
             }
 
-            self.statusLabel.text = status;
+            self.statusLabel.text = newStatus;
             self.statusLabel.sizeToFit()
         }
     }

    }

    func uploadPhoto(imageData: NSData, index: Int, totalNumber: Int, creationDate: NSDate) throws {
        self.updateStatus("Uploading: " + String(index) + "/" + String(totalNumber), count: index, total: totalNumber)

        let host = self.host.text
        let port = self.port.text
        let username = self.username.text
        let password = self.password.text
        let session = NMSSHSession(host: host, port: Int(port!)!, andUsername: username)

        session.connect()
        guard session.connected else {
            throw ConnectionError.NotConnected
        }

        session.authenticateByPassword(password)
        guard session.authorized else {
            throw ConnectionError.NotAuthorized

        let sftpSession = NMSFTP.connectWithSession(session)
        let date = formatDate(creationDate)
        let filePath =  self.remoteDir.text! + "/" + date + ".jpg"

        self.updateStatus("Uploading...", count: index, total: totalNumber)
        sftpSession.writeContents(imageData, toFileAtPath: filePath)
        self.updateStatus("Done.", count: index, total: totalNumber)
        NSLog(filePath + " successfully written.")
        
        session.disconnect()
