Thanks for the replies!
I found $lt at https://community.mp3tag.de/t/scripting-functions/51689, but after both of you saying it isn't available I checked https://docs.mp3tag.de/scripting/ and didn't find it listed. Looking at the community post I see it was in the Mac forum, so maybe it doesn't work in Windows or was removed after that post was made.
I first tried with $num(%series-part%,x) but didn't get it working. I'll go back and try again.