BUG: AttributeError: 'BooleanArray' object has no attribute 'sum' while infer types #44079
- [x] closes #44079
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit) for how to run them
- [x] whatsnew entry

Well the failing check is a different problem. And it's a future warning treated as an error. I should be able to fix that, but probably better on a different thread?  thanks @zhangxiaoxing 