Fix SqliteAssociationCriteria.count().
Add unit tests for SqliteAssociationCriteria.