Added counter test.
Fixed typo
Added If-then construction.