fix bug on count the deleted matching Statements

- the count is wrong because of overwriting the $filter variable and wrong accessing of the $result variable
Merge pull request #70 from larseidam/develop

fix bug on count the deleted matching Statements