add count() helper function

fixes #15
add comments and clean up a few scripts

fixes #11
add my .gitconfig, source it from .git-rc