programming a pir sensor using arduino

The objects are just 3 coins.

A PIR sensor is useless for detecting cold metal coins. PIR sensors detect people, so you'll need to set your apparatus up to count people carrying coins. Good luck with that.