Data Analytics would do a lot of that part for you. In combination of the B2B connectors and the predefined software license rules it will try to give you accurate counts on these kinds of things including cross version licensing. (IE. Adobe Design CS5 would Cover CS4 and it would be displayed as licensing borrowing)
Other then that, if you're just using SLM you should just be able to increment the number of licenses for CS5 in your import and decrease the number of licenses for CS4 and import that.