As a long conscious process, that is, choosing the model, saving, and then buying, just 2.
However, I now live in Germany, a paradise for used bikes, so I'm constantly flipping, fixing, keeping, then selling, donating, swapping for another, getting bikes for non-cyclist friends, for my kids...