Depending on the version of S4 and S5, Lollipop may cause bugs. And they'll be different bugs for different models (for different carriers). Both the S4 and the S5 have had bugs with Lollipop. It's not the phones, it's the fact that 5.0, 5.0.1 and 5.0.2 were released long before all the bugs were worked out. (Google is going the way of the MBA, not the way of the CS any more - set a release date for a ROM marketing thinks the public will like, then release it on that date. You can't write software like that. You never could. [Not in the almost 42 years I've been writing it.] As Haalcyon said, maybe by 5.0.5, or 5.5, or 5.9.9, they'll have it worked out, but I'm not updating until they do - I'm still on 4.4.2, and I'm staying here. Pretty interface with bugs or a phone that works - tough choice, huh?)
There may never be a 6 for the S4, but there might be for the S5 (it depends on timing). But don't choose the phone based on how it might work with some future version of Android, choose based on how it works now. If the 4 meet your needs, and working the way it does now, will continue to meet your needs for as long as you plan to keep it, there's no reason to buy the 5, unless they'll give it to you for the same price. (Three chances of that and Fat and Slim have left town, only No is still here.)