glyphcounter

.http://pasted.co/a7bd558a

This python script recursively counts the number of glyphs. A glyph can be considered as a collection of continuos 1s in this case Xs. This is a simplified charecter reader. In the above example it will count 4 glyphs.

By Gabriel Thomas Maliakal