My railing height is 38 inches at the top and local code says 36" is the minimum height. That being said, I added a 2x4 in end under my top rail to add rigidity and support, which lessened my over all space to closer to 34 inches. Code in my area says that the spacing has to prevent a 4 inch sphere (a childs head) from passing thru. I am right at right at 4-4.25 inches running 7 lines (ends up creating 8 individual spaces) but I was not worried about any inspections, etc.. If you think you will be inspected I would run the extra lines but I have seen a lot of projects where guys only ran 5 lines, which to me is just asking for trouble. The biggest thing you will run into from a code standpoint even if you go with 3" spacing, is that you have to get the taught enough that some can not pull them apart more than 3 inches. The best way to overcome this is to use more intermediate posts. Again, I minimized my post placement and still got mine nice and taught but I could not say with confidence that I would pass an inspection, however, my son is also not getting thru, believe me, he has tested it!
Hope this helps and feel free to give me a call if I can help.