Greetings All

I'm trying to count how may times an audio file is looped then cause it to stop after say 6 loops.

1) I plan on using the "select" object to compare the sample size (22050) to where the playing wav file is located
2) create a bang into "cup" object from the "select" object, this will count the number of loops.
3) Use another "select" object to stop when it reaches 6

The problem I'm having is trying to compare the sample size to where the playing wav file is currently located.
I can get the sample size using the "wavinfo" object but how do I get the current location of the playing wav file.
(I tried using the "metro 50" object with the "snapshot~" object) but the numbers don't seem be matching up

Is there another way I should be doing this

Thanks