Infering the number of runs