Basic step counting algorithm and test vectors