It uses SWAR technique for counting bits because target platform wasn’t specified in compiler flags properly. popcnt and family are specific family extensions and without specifying the target flags the compiler generates lowest common denominator among available instructions
Edit: add -msse4 and you will see popcnt appear because popcnt is the SSE4 extension