Implement counter in register file (R31)