add stats counters. fix bugs to actually parse context/number.