title: How to count the number of indices in a Gnuplot input file
body: <p>so I want to plot from a data file which has an undetermined number of fields of x and y data (of unknown but constant length). I want to plot them all together on one graph, BUT with different colors.</p>
  
  <p>Without specifying the index, they all plot together with the same color.</p>
  
  <p>Using a for-loop on the index or writing the indicies individually DOES plot them together with different colors, BUT the program will not know how many indicies to loop over.</p>
  
  <p>Setting a really high number for the max of the for-loop works, but makes error messages when it runs out of data.</p>
  
  <p>Is there any way to manipulate the data in gnuplot to derive the number of indices for the for-loop? </p>