Hi CBrown00,
We provide a GetErrorCount command in qRules v2.3 that lets you get the number of required fields that have not been filled out (or fields that are invalid). You could download a free trial and have that working in 15-20 minutes. Of course, if the fields aren't required they won't add to the count so you will need to make your fields required and that will mean your new form will not be backwards compatible with old XMLs created with blanks for those now-required fields.
To do this on your own, you can add rules to your form that calculate when fields change, but even if you set the rule to fire on the root node, that solution will be quite involved (since as you will have to add data source nodes to calculate) and the rules won't be easily portable to other form templates. That's why we added it to qRules. Your approach isn't bad for one solution, but it won't be portable to other solutions.
qRules trial is free and the plug-in is cheap. We use it as a way to defray cost of supporting this free forum. It will repay you in dividends since it has support for all of the common issues that surface when you try to develop InfoPath solutions.
Best of luck,