example usage of $sum operator

This example illustrates the usage of $sum operator in two different ways. 
1. sum as total
2. sum as count.

Similar to other pages on operators, this page will be consistent and comprehensive with the example.