The value of the TCC counter on an ATSAM controller always reads as zero
There is a command in the Control B register of the TCC peripherals,

READSYNC – Force a read synchronization of COUNT

The value of the COUNT register is not valid until this command is issued and fully executed.
Sample code, tested on a SAMD21E17A device:
// Step 1: Issue READYSYNC command
TCC0-&gt;CTRLBSET.reg = TCC_CTRLBSET_CMD_READSYNC;

// Step 2: Wait until the command is fully executed
while (TCC0-&gt;SYNCBUSY.bit.CTRLB); // or while (TCC0-&gt;SYNCBUSY.reg);

// Step 3: Now we can read the value of the COUNT register
int count = TCC0-&gt;COUNT.reg;

The resulting value of the variable count corresponds to the value of the counter when the READSYNC command was actually executed.
For additional information, check chapter 31 of the SAM D21/DA1 Family datasheet