var number_coins;

function count_coin()
{
if(event_type==EVENT_IMPACT)
{
number_coins+=1;
ent_remove(my);
}
}
action coin()
{
my.emask|=ENABLE_IMPACT;
my.event=count_coin;
}

and give the action to all coins


asking is the best Way to get help laugh laugh laugh