function resetCounter
% resetCounter -- reset counter to zero
global countdata; %! Declare that \code{countdata} is in the global environment.
countdata = 0; %! Update it