This section of the code:
for p in range(1, 100):
...
if pixel_counter[p-2] > pixel_counter[p-1]:
continue
else:
break
... dead code ...
will slurp all of the execution, the part where I've marked dead code, which contains your counters are never executed because they're unreachable.
I'm not quite sure what your trying to do there.