add counting to index
Merge pull request #29 from p1tz/master

merge