Added more tests

Fixed database.count so that it works
Added test for empty database with fieldsearch interaction
Tested some uncovered branches
Added more tests for the Field methods