Perhaps I'm misunderstanding the security model behind this, but why should the site be storing my password's length at all? Why does it know I have a 10th character at all? The site should just have a hash of my password (normalizing the length).
Similarly for pre-hashing certain subsets; a four-character password can be too easily brute forced.