Picaxe color sensor + arduino- help please!

Hello everyone, I have a big problem, I want to detect colours with picaxe colour sensor conected with arduino, but I don’t know how to conect it to arduino.
By the way here is the datasheet of the sensor: http://www.sparkfun.com/datasheets/Sensors/Imaging/AXE045.pdf
Help please!

Connect S2 and S3 to two output pins so you select which color channel to read: Red, Blue, White, Green.

Connect O to an input pin so you can count pulses. If you use D2 or D3 pins you can use the interrupts to count pulses.

The document provided gives no details about the expected pulse rates. I'm guessing that the "50" parameter in the Picaxe code means count pulses over 50 milliseconds. They get values from 0 to 350 pulses so I'd guess the pulse rate goes up to roughly 7000 Hz. You could try using pulseIn() to measure the width of a single pulse in microseconds (7000 Hz = ~14 microseconds per cycle = ~7 microseconds per pulse, if they are symmetric). If pulseIn(pin, HIGH) doesn't get changing results, try switching to pulseIn(pin, LOW).