Create function to count the moves. Use it in order to move the animals.