K (ngn/k), 1010 7 bytes
{#(+/2\x)^0}
Straightforward solution.Thanks @coltim for -3 bytes by suggesting me that I can just take the sum instead of the count of 1
s
Cast the numberinteger into base 2, remove all the 0
s, then return the length of the arraysum.