Updated count to use internal register