A general framework for measuring system complexity. (30th March 2016)