This tutorial can be applied to any of the Walker classes in WordPress to track the number of items (children) associated with an element (the parent).
Encode any PHP script and customise the output with many options; Multi-layered, anti-rename, SNTP verification, minify, compress, and always a unique output.