I'm assuming you are either a student or a person who wishes to learn how to do a relatively simple task using a PLC, specifically the DL06. You have identified some aspects of the task. The external items - a photoeye to sense the part and a pneumatic valve as ouput. You have also gone a long way toward identifying internals of the PLC - some method of counting and some method of controlling the output in time (pulse).
So next get the DL06 manual. It's free online. Skip the beginning and go right to the introduction to ladder logic. Write a simple program to turn on the output every time the photoeye sees a part. It's not what you want but you'll have the hardware in place and working.
Next, go to the sections on timers and on counters. Read through these carefully. Modify your program so that the passing of a part increments a counter. Then further modify it to reset the counter when a specific number of parts have passed by.
Finally, let the reset of the counter start a timer. While the timer is timing, fire your output (pulse).
Taking it in steps like this will teach you the most about the system and you'll end up with an incredible start into this type of control.
And come back here telling us about your initial sucesses, even "I got an output to turn on when the photoeye saw a part!". The members here will help to guide when you hit some tough concepts without hindering your learning by giving too much help.
(In case I am mistaken and you just want someone to provide a working program right now (and you aren't a student), there are several professionals who will be willing to do that for a negotiable fee.)