have a look at the for loop - http://www.arduino.cc/en/Reference/For -
or something like this
int maxshots = 4;
int shots = 0;
void setup()
{
...
}
void loop()
{
if (shots < maxshots)
{
rotate(90);
take_shot();
shots = shots + 1; // or shots++; in short
}
// do other things here
}
void rotate(int degrees)
{
... // rotate code
}
void take_shot()
{
.. here the code to take a shot
}