My circuit is similar to this. I use a 4N25. I have used more parts. Don't like the look of the low pulse widths. They are too wide. Mine are much narrower than these. I have found you can't pick up a rising or falling pulse on Arduino. They are too brief. But you can use pulse widths in your programming as I have suggested somewhere else on this topic.
If you are polling in software to catch these edges you will have very poor results.
The standard way to do this is by using interrupts. Certain IO pins can be configured to automatically cause an interrupt on rising or falling edges.
This way, timing jitter can be reduced dramatically, and you don't need to waste CPU bandwidth on polling.