If you look at the code that I submitted in the thread just before this one, I'm doing an xpath statement and checking the values of each node in a do while statement.
You should be able to do something similar but incorporate a timer instead of comparing each value.
In other words, set a numeric variable to "0", check the first node, increment it by one, test to see if it equals 10, if not do it again (loop) and keep going until it equals 10, then exit the do while.
Know what I mean? What language are you using?