[WFLY-1982] synchronize counter methods