use count_ones