How to limit the loop for animation

Please tell me how can i limit animation loop i want my animation to loop 8 times.or play animation 8 times
thank you in advanc

use for loop in update function
for(i=0;i<8;i++)
{
animation.Play(“animation name”);
}