ah,so you want to count 5,10,or whatever the value coins
i don't get you want to count real coins by scanning with some machine ? i guess so ..
if you want to print anything you need save that text you want to print in txt file by commands fopen (opens a txt file, wich is in your case empty),fwrite (writes in that file text), then fclose (closes file,saves what you've written there),
so the remaining thing to do is to print that txt file. i don't remember wich commands are used for that