Multi-hit attacks

Can someone help me with the damage formula to set up an attack like fury swipes in pokemon? I want it to hit between 2-5 times and then display a message saying how many times it hit.
That doesn't have anything to do with the damage formula - the damage formula is for calculating how much damage you do.

You can stick some extra things in there, like adding states and such, but you can't alter the targeting of the skill or display messages when it's done.

What you want to do would be achieved by Yanfly's action sequences plugins. There are thorough instructions in each of those plugins, as well as several multi-year threads here on how to use them and examples of sequences other people have made - I'm sure you'd find something with a random number of hits like you describe.

Original thread: https://forums.rpgmakerweb.com/threads/multi-hit-attacks.148250/