Lines counter