Useful popularity algorithm, in case you’re building your next big thing.