Add count assertion to database module