As the title says.
I was writing a program in Swift that required bit operations for about two weeks, but I didn't notice the existence of this method and grew the extension myself. As per nonzeroBitCount | Apple Developer Documentation,
nonzeroBitCount does the equivalent calculation.
Probably because of the method name, it was troublesome because I couldn't find it easily even if I searched for "Swift pop cnt" or "Swift bit count".