A general discussion of population count: https://stackoverflow.com/questions/8590432/when-to-use-parallel-counting-mit-hakmem-for-bitcount-when-memory-is-an-issue