bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)

(cherry picked from commit 6bd3ecfc272b122b55a6adec50dd7a7c868f262f)

Co-authored-by: Rupert Tombs <rupert.tombs@gmail.com>
5 files changed