I'm struggling to find the benefit/reason for a bit-sum here, you could use a global integer for this, as fysiks suggested. An integer would always only cost 32 bits of memory, where if you want to expand your bit-sum over 32 bits, you are immediately moving to 64-bits, more memory than what just an integer would use. Not that a few bytes of memory consumption would make or break your plugin, but it would be simpler the integer way since you do not need to use the bit operators.