put counter reset in correct location. Fixed #23
Merge pull request #31 from sethwhitaker/bug/count-direction

Put counter reset in correct location