Added counter.py to remove readerwriter

also fixed some incorrect method calls that caused the pipeline to fail.