Addition:
The main point of this addition is to give some answer to the 3. point in the question.
First, just to repeat what others have already said on 2.: If P writes a paper or a book and A and appendix to it, then the author is just P; the fact that A wrote an appendix is sometimes contained in the title, or it can we added ('with an appendix...'); in the bib-tex data of MathSciNet this information is stored as a 'note'. Looking through MathSciNet one can also find appendices (written by other authors) that are an item in there own right. (Search for 'appendix' in the Title to find example of this; though not everything returned is an example for this). Sometimes, but by no means always, they appear with a certain delay (and also contain some corrections); yet in other cases this is not so and this differences might (but I am not completely sure), be merely a technicality how the journal handles this. In general, I think a good solution is to simply follow the way in which MathSciNet handles this.
Now for question 3. "My impression is that the number of such appendices has been increased drastically in the recent years. Is it true?"
My answer to this is: No.
Remark: of course the absolute number increased quite a bit, but so did the number of papers in general (as well as the fraction of co-authored papers). I thus think the relative frequency is key, and while there seems to be some increase to call it drastic seems more than too much.
Here is what I did: I searched MathSciNet for 'with an appendix by' in the field 'anywhere' and limited the search to 'journals' [to avoid appendices to books]
This is certainly not a perfect method and does not catch all appendices by other authors and might also yield some false positives, but to get a rough idea it seems good enough, in particular if the goal is to get an idea of the development.
So here are the numbers (hits for the search / approx. total number of items in millions)
- All: 509 / 2.2
- 2000 and earlier: 264 / 1.4
- 1990 and earlier: 116 / 1
- 1980 and earlier: 42 / 0.6
- 1970 and earlier: 12 / 0.3
Thus, I would say there is some increase but by no means a dramatic one; and the existing increase should be easily explainable by the general increase of papers written in collaboration.
As an add-on some older papers with appendix (all in pure math):
Mazur, B. Rational isogenies of prime degree (with an appendix by D. Goldfeld). Invent. Math. 44 (1978), no. 2, 129–162
Lang, Serge The group of automorphisms of the modular function field. With an appendix by P. Deligne. Invent. Math. 14 (1971), 253–254.
Pólya, G.; Schiffer, M. Convexity of functionals by transplantation. With an appendix by Heinz Helfenstein. J. Analyse Math. 3, (1954). 245–346.
So, as said, I think this phenomenon has quite some tradition.
First answer:
You do not mention it explicitly, but there are also appendices to papers by the same authors. Thus, author-credit can certainly not be the only rationale.
Two other reasons for an appendix:
The content of the appendix are 'just technical arguments' and the authors do not want to clutter the main article with them.
The appendix contains some investigations tangential to the actual article but suggested by it.
In particular, 1. is I believe quite common in (some) more applied parts of maths, in particular TCS.
And, point 2. can reasonably be done by a person not the author, and even after the article is essentially complete. Thus, one reason for an appendix can be that one receives significant comments on a preprint, yet possibly on a tangential point. Something like, some technical lemma when considered right is of independent interest or alike.
One thing that is also worth pointing out I believe is that the general idea that if A has an appendix to papers of B and C, then B and C did not let A 'in' as a main author, is certainly a misconception (as a general reason, in particular cases it might be like this). There are papers where the author of the appendix is by a significant margin the most well-established of the authors, and the idea that the main-authors did not want him/her as a co-author seems strange.
Regarding frequency, I do not really know whether the increase of appendices is higher than the general increase of co-authored papers, it might be due to more rapid communication.
As a final remark: an appendix authored by somebody else is not a very recent (mis-)development prompted by the fact that people now care or have to care more about author-credit. By contrast, I think it is a good tradition and a consequence of the fact that paper-count is not (or at least was not) considered overly important in maths.