Assuming you are using an CCP capture interrupt there will be a small interrupt latency between entering the int routine and actually toggling the output pin, a latency of maybe 10 or 15 PIC instructions, so you need to do;
35323 - 10
Then check it on a frequency meter to fine tune the exact frequency.