If I had 7 apples and my friend took one and I have 8 how did I get 8?

If I had 7 apples and my friend took one and I have 8 how did I get 8?