An interesting one here. It could be a bug or I might be missing a trick. In my thesis I use \numberwithin{}{} to have numbering done within sections. Top level is chapter, so it goes <chapter>.<section>.<table counter>.
In my appendix, this is too much, so I only want numbering within the chapter i.e. <chapter>.<table counter>. Therefore numbering will run across different sections and the left most digit will go up when the chapter changes.
However, if I use \numberwithin after the appendix, then it subtly messes up the numbering. It gets the number of indices correct, however, the right most index doesn't change. My guess is, that it is confused and is still thinking it should be changing the third index (which isn't printed).
I have included a working example. Any one have a clue?
\documentclass{book}
\usepackage{amsmath}
\numberwithin{table}{section}
\begin{document}
\chapter{Thing}
\section{the first section}
\begin{table}[h!]
\caption{wib}
\begin{tabular}{c}
hello
\end{tabular}
\end{table}
\begin{table}[h!]
\caption{wib}
\begin{tabular}{c}
hello
\end{tabular}
\end{table}
\section{second section}
\begin{table}[h!]
\caption{wib}
\begin{tabular}{c}
hello
\end{tabular}
\end{table}
\begin{table}[h!]
\caption{wib}
\begin{tabular}{c}
hello
\end{tabular}
\end{table}
\appendix
\numberwithin{table}{chapter}
\chapter{first appendix chapter}
\section{first appendix section}
\begin{table}[h!]
\caption{wib}
\begin{tabular}{c}
hello
\end{tabular}
\end{table}
\begin{table}[h!]
\caption{wib}
\begin{tabular}{c}
hello
\end{tabular}
\end{table}
\section{second appendix section}
\begin{table}[h!]
\caption{wib}
\begin{tabular}{c}
hello
\end{tabular}
\end{table}
\begin{table}[h!]
\caption{wib}
\begin{tabular}{c}
hello
\end{tabular}
\end{table}
\end{document}