Implemented ReadPort/WritePort protocol with wrapper to count number of items in channel