I don't exactly know what issues you're having, but here are a couple of suggestions. First, start the Counter task before starting the AI task. The way it is written now, there is a race condition where the two tasks might not start at the same time. This can happen if the the AI start trigger is received before the Counter task is started. Second, instead of using the default input, wire a value into the number of samples per channel input of the Read VI. The default of -1 means read all available samples and since the two reads are called at two different points in time, you will likely read a different number of samples for each task. This may make storage and analysis of the data trickier. If this is a problem, I would recommend wiring a constant value into each VI or calculate the size of the array returned from the AI Read and pass that size to the Counter Read.