Hello,
If I understand your question correctly, you would like to know how you can use a counter to generate a clock to time digital I/O on your USB-6259. If this is indeed what you are trying to do, here are links to two examples:
Developer Zone Example: M Series Hardware-Timed DIO with Counter Clock Generation (This example is in LabVIEW)
Developer Zone Example: M Series Correlated Digital Input with Counter Clock Generation in ANSI C (This example is in C)
With regards to your second question -- could you please explain more thoroughly what you mean by achieving synchronization with digital I/O? Since you are using one clock for all DIO channels on the device, they will already be synchronized without any additional configuration. Now, if you are wanting to synchronize digital I/O across multiple devices, that would be a different story. Please clarify exactly what you mean and I can help you more on this question.
I hope this helps! Please let me know if there's anything else I can help with.