Updated counter algorithm to be file independent
Removed requirement to store state in external file
Updated test with uniqueness test