Modiefied Counter to allow pipelining