counting bits set the naive way related