Adding total stages info to json api