BUG: fix length_of_indexer with boolean mask
- [x] closes #25774
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Allows for a nice cleanup in _setitem_with_indexer.  Note this will conflict with #31887; the order doesn't matter.