Is there a way to determine the number of characters in the wallet password?
I don't know about PBKDF2 implementation on Bitcoin Core, but AFAIK it's impossible. I checked such possibility with PBKDF2 tools online (e.g.
https://asecuritysite.com/encryption/PBKDF2z) and i got same length on different password with different length.