Extract the number of animation loops from the gif.