SpHr_bitCount(val)
Returns the number of bits in val that are set
Example
variable val = 0 // no bits set
val = SpHr_bitSet(val, 0) // set bit 0, first bit
val = SpHr_bitSet(val, 3) // set bit 3, second bit
Print SpHr_bitCount(val) // Prints 2, indicating that 2 bits were set