My goal was to determine the size of a single dimension index based on the 
contents of the first column [row] of a matrix. For instance if I have Q=(1,0,2) I want
an index N=2, for two non-0 elements for Q1 and Q3. Q can be any size and any
number of 0 elements can exist.