B: Learning to use advanced counting to solve problems