add beforeCount()
Merge branch 'develop'