outer counter

set up counter for lines in grid