count the number of todo blocks, and add a trace