For counting the number of 1 bits in the array. Like for example local c = Bitarray.new(16):from_uint16(4015):count() --> 10 '1' bits on