I was under the impression that it was always possible (but not mandatory) to port your old number *from* any wireless carrier, *to* any wireless carrier. The only possible exception would be when you are moving, and you want to have a local number in your new location.
In Canada, at least, it's possible to port numbers from one cellular service to another, or from one landline service to another (provided the new landline service is located within the same local calling area), or from a landline service to a cellular service, or from a cellular service to a landline service (provided the new landline service is located within the same local calling area).
I've never personally been charged a fee to port my telephone number between service providers, but (in Canada) there is no regulation preventing a wireless carrier from charging a porting fee if they see fit to do so.
To answer the question, I've had my wireless number for about 1.5 years now (my first and only cellular plan), and my landline number (since landlines weren't actually excluded from the title of the poll) for 10 years across 3 different service providers.