Dashing widget to show widget count

We build a lot of Dashing widgets dynamically, and discard just as many (see clearing Dashing widgets). As a part of that, I like seeing how many widgets we currently have, since each dashboard only displays a small faction of our total widgets.

We have the following file in our jobs/ directory:

 

This goes through the widget list and updates a widget called widget_count with the total number, which can be displayed in a nice little number widget.