fix getCounts function
Merge pull request #6 from jmdicosola/master

Fix issue #6 getcounts fn