It figured mine out in exactly 20. This is an old, very simple algorithm that forms a decision tree, but they have enhanced it a little by giving you more answers than a simple yes or no.
In fact, I remember when I first got my Apple II computer I wrote a BASIC program to play 20 questions. It really is surprising how well this works on a simple game. The version I coded years ago ended up taking a guess at the end. If it was wrong, it asked you to enter a question which would differentiate between its guess and the correct answer, so it actually "learned." I thought this was really cool because it then stored your answer on the Apple II's might 5.25" floppy drive!