Design and validation of a minimal complexity algorithm for stair step counting