count and send pulses simultaneously

On the due, you can attach an interrupt handler to each pin.

void ISR1() {

//rising edge
//count up

}

const uint8_t input = 22;
attachInterrupt(input, ISR1, RISING);