Previously, we were always issuing a database query, so that only those files already stored in the database were counted.