How to have an animation loop only twice

Hey guys,
Im new to animation, but ive attached a 2d animation to a 3d object in the inspector. so far I’ve made it so the animation plays once when the child 2d animation is set to active. I would like it to play 2 or more times. How do I set an animation to play only a certain number of times and then disappear after it is done? You do not need to code for me, just point me in the right direction. Thanks,

Images for reference!!

The curvey slash thing is what i want to loop twice (shown below)
Imgur

here it is attached to the gameobject as a child
Imgur

I think this is what you’re looking for: Unity - Scripting API: Animation.Play

Just use the play() function in a script to play the animation however many times you want.