This is a very good question. Some people get two copies, but some get three. I got three, for example, but haven't used AP yet. In many posts around here, people who get two copies give both to the immigration officer. If you give both, then two things can happen: The officer stamps them and then gives them back to you, or s/he stamps them, keeps one, and gives the other back to you.
I don't know what would happen if you only gave one. I haven't read that anywhere. But since some people have experienced the border agent keeping one copy, it is probably best to have both with you just to avoid the hassle. It seems like the border people themselves aren't settled on what the procedure is. You may get other replies here that contradict this message or elaborate on it, which is further proof that there is not clear set system!!