count the number of possible configurations in a babylon game