BUG: .count() raises if use_inf_as_na is enabled
- [x] closes #29478
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Thanks @thy09  It's my pleasure!

When will the next version release?
This issue caused some problems in our project now. >  When will the next version release?

Pandas 1.0 is planned for beginning next year
 Thanks a lot!