popcnt function for 32-bit