Implementations of bit counting.