Code Structure Advice

in my code, i don't capture "<", so the counts are off by one