Fix closed tickets stats count

Addresses issue #525