An XOR gate will change it's output whenever an input changes. If you use an XOR gate for each pair of clocks, and feed the outputs into another XOR gate, then if any time any of the clocks change, the output will change. Thus, a counter which uses that as a clock will count the pulses.
The problem with this is that if the clock input transistions occur too close together, the input to the counter can change too quickly, and violate the setup or hold times. Also, if clocks change together, you'll miss a pulse.
I think this works. You may wish to take a few moments to verify it.
Regards, Bob Monsen