Create function to count the attacks. Use it in order to choose the attack for animals.