Yeah, kind of.
What you need to do is use a value to keep track of the amount of coins, apples, whatever that you have. You should probably add a limit to the amount the character can carry at the same time.
Alternatively you could do like what they did in the monkey island games where they had a few images that represented one item, a small handful of said item, a medium amount of said item, & a lot of said item, that way you don't need to create images for every single addition, because that would be an insane amount of work. Instead you would use the values & query a range between 2 numbers to determine which image to show...
Let's say, you have 1 coin, so you show an image with 1 coin. now let's say you have 2-10 coins, so now you should an image with a small amount of coins, now let's say you have 11-25 coins, so now you show an image with a medium amount of coins, & so on, & so on - it would work both ways seeing as you can add & subtract from a value.
ok, I don't really know how to explain how to set this system without an example, but I don't have the time/resources available to create one, so text will have to do.
1. Create a value somewhere in the editor - somewhere easy to access, like on your main character. Name it something along the lines of "money", & set the default value to 0.
2. Create an item, & call it "itm_money".
3. Now create some images for it that represent 1 coin, a small handful of coins, a decent amount of coins, & a lot of coins. Add each of those images to the item you just created in step 2.
4. edit each frame of the animation & open up the "actions" popup window & create an execute a script action part & add this code inside - edit as needed.
if Values["money"].Int <= 1 then
ActiveAnimations["itm_money"].FirstFrame = 1
ActiveAnimations["itm_money"].LastFrame = 1
elseif Values["money"].Int > 1 and Values["money"].Int <= 10 then
ActiveAnimations["itm_money"].FirstFrame = 2
ActiveAnimations["itm_money"].LastFrame = 2
elseif Values["money"].Int > 10 and Values["money"].Int <= 50 then
ActiveAnimations["itm_money"].FirstFrame = 3
ActiveAnimations["itm_money"].LastFrame = 3
elseif Values["money"].Int > 50 then
ActiveAnimations["itm_money"].FirstFrame = 4
ActiveAnimations["itm_money"].LastFrame = 4
end
You need to add that same script in each frame as that will auto-force the animation to the correct frame whenever it is shown.
5a. Again on your main character, open up the actions tab & create a called by other action part & rename it to something along the lines of "check_money".
5b. Now create these action parts...
if Value "money" is equal to 0
if character has item "itm_money"
remove item "itm_money"
end if
elseif Value "money" > 0
if character has item "itm_money"
else
add item "itm_money"
end if
end if
6. now whenever you add or remove money from the value, you need to call that called by other action you created in steps 5a & 5b, as that will add or remove the item from the characters inventory if you add money & they don't yet have the item, or you have spent all the money, but still have the item in their inventory.
Hopefully these steps will help you come up with a working system.
The alternative would be to use a UI based approach like a lot of platformer games such as super mario have where it shows coins/lives, etc permanently on the screen.