`popcnt` isn't an intrinsic: https://github.com/D-Programming-Language/druntime/blob/master/src/core/bitop.d#L218

It uses the same algorithm as I have, except `countBitsSet` works with any integral type.