Fast cross-platform bit counting using intrinsic functions