Computes and returns the number of bits
in the two's-complement binary representation of integer
that are `on' or `set'.
If integer is negative, the 0 bits are counted;
otherwise, the 1 bits are counted.