fix count line
#add tests
Merge remote-tracking branch 'origin/reka' into chemodurov
Bug fixing and refactoring