Adds countByValue().
Adds function countByKey().
Minor fix.
Adds function numPartitions().
Merge pull request #106 from hlin09/hlin09

Add function countByValue() and countByKey().