detecting two rising edges from camshaft signal

Ah, missed that image at first.

Looking at it, the way to detect a double pulse APPEARS to be that the interval between the pulses is shorter than the length of the pulse itself. Furthermore, the second of the double pulse appears to be the data point you're looking for (that one looks like it's pretty much in sync with the other three pulses).

So that would make detection of the double pulse quite straightforward: record the length of the pulse, and if the next pulse comes within that time span that is the pulse you're looking for. So upon startup of the sketch it looks for the double pulse, and then it can just count, ignoring every fifth pulse (the "pre-pulse" for the double one) for timing, maybe using that to confirm no pulses were missed in the process.