Optimised Algorithm for Step Count Estimation Using Sensor Data from Smartphones and Wearables