I am trying to check how many instances of an application (Adobe Reader) that is running.
Let's say I assume that there will be 3 Adobe Reader's open. To check that the 3rd one is open, I can do the following:
Validate.Exists("/form[@title='Report' and @processname='AcroRd32' and @class='AcrobatSDIWindow' and @instance='2']");]
However, this way I have to know the largest instance number. What I rather need to do, is to get a count of the number of instances. Or get the largest instance number that exists for that process. Same thing

Ideas?
Thanks