I don't count just passing through (even if you do go through the process of clearing immigration to get the stamp) as a visit in my country count list. You have to actually "do something" there for it to count.
As for how long it would take, with an unlimited budget probably a year. In reality, several. I did six new countries last year and will do six more this year as leisure trips. I don't plan to maintain that pace - I don't think that it is sustainable as the countries remaining get to be harder and harder to visit - but setting a reasonable target and budget means that you can visit a lot of the world.