Add stats tracking to the DFS search.