simple bug fix for counting larger than kind 1
Merge pull request #32 from mjberger/master

trimbd bug fix
Merge remote-tracking branch 'upstream/master' into regions

* upstream/master:
  simple bug fix for counting larger than kind 1