'Test the search method with count=True.'

@mute_logger('odoo.models')
def test_04_query_count(self):

    self.cr.execute('SELECT    COUNT(*)    FROM    res_partner    WHERE    active')
    count1 = self.cr.fetchone()[0]
    count2 = self.env['res.partner'].search([], count=True)
    self.assertIsInstance(count1, (int, long))
    self.assertIsInstance(count2, (int, long))
    self.assertEqual(count1, count2)
