Dynamic component count to text file

Some other topic threads that will help: