override count function to work with postgres
Merge pull request #18 from radzikowski/master

Issue with count function