Index: modules/aggregator/aggregator.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.admin.inc,v
retrieving revision 1.24
diff -u -p -r1.24 aggregator.admin.inc
--- modules/aggregator/aggregator.admin.inc	26 Jan 2009 14:08:42 -0000	1.24
+++ modules/aggregator/aggregator.admin.inc	22 Feb 2009 18:36:04 -0000
@@ -31,7 +31,7 @@ function aggregator_view() {
   }
   $output .= theme('table', $header, $rows);
 
-  $result = db_query('SELECT c.cid, c.title, count(ci.iid) as items FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid GROUP BY c.cid, c.title ORDER BY title');
+  $result = db_query('SELECT c.cid, c.title, COUNT(ci.iid) as items FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid GROUP BY c.cid, c.title ORDER BY title');
 
   $output .= '<h3>' . t('Category overview') . '</h3>';
 
Index: modules/simpletest/tests/database_test.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/simpletest/tests/database_test.test,v
retrieving revision 1.39
diff -u -p -r1.39 database_test.test
--- modules/simpletest/tests/database_test.test	25 Jan 2009 12:19:32 -0000	1.39
+++ modules/simpletest/tests/database_test.test	22 Feb 2009 18:36:07 -0000
@@ -604,7 +604,7 @@ class DatabaseUpdateTestCase extends Dat
     $num_updated = db_update('test')->fields(array('job' => 'Musician'))->condition('job', 'Singer')->execute();
     $this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
   }
 
@@ -615,7 +615,7 @@ class DatabaseUpdateTestCase extends Dat
     $num_updated = db_update('test')->fields(array('job' => 'Musician'))->condition('age', 26, '>')->execute();
     $this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
   }
 
@@ -638,7 +638,7 @@ class DatabaseUpdateTestCase extends Dat
     $num_updated = $update->execute();
     $this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '1', t('Updated fields successfully.'));
   }
 }
@@ -669,7 +669,7 @@ class DatabaseUpdateComplexTestCase exte
     $num_updated = $update->execute();
     $this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
   }
 
@@ -682,7 +682,7 @@ class DatabaseUpdateComplexTestCase exte
       ->execute();
     $this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
   }
 
@@ -695,7 +695,7 @@ class DatabaseUpdateComplexTestCase exte
       ->execute();
     $this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '1', t('Updated fields successfully.'));
   }
 
@@ -708,7 +708,7 @@ class DatabaseUpdateComplexTestCase exte
       ->execute();
     $this->assertIdentical($num_updated, 2, t('Updated 2 records.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '2', t('Updated fields successfully.'));
   }
 
@@ -721,7 +721,7 @@ class DatabaseUpdateComplexTestCase exte
       ->execute();
     $this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '1', t('Updated fields successfully.'));
   }
 
@@ -738,7 +738,7 @@ class DatabaseUpdateComplexTestCase exte
       ->execute();
     $this->assertIdentical($num_updated, 1, t('Updated 1 record.'));
 
-    $num_matches = db_query("SELECT count(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
+    $num_matches = db_query("SELECT COUNT(*) FROM {test} WHERE job = :job", array(':job' => 'Musician'))->fetchField();
     $this->assertIdentical($num_matches, '1', t('Updated fields successfully.'));
 
     $person = db_query("SELECT * FROM {test} WHERE name = :name", array(':name' => 'Ringo'))->fetch();
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.45
diff -u -p -r1.45 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	13 Feb 2009 05:42:24 -0000	1.45
+++ modules/taxonomy/taxonomy.admin.inc	22 Feb 2009 18:36:08 -0000
@@ -266,7 +266,7 @@ function taxonomy_overview_terms(&$form_
     // We are not calling taxonomy_get_tree because that might fail with a big
     // number of tags in the freetagging vocabulary.
     $results = pager_query(db_rewrite_sql('SELECT t.*, h.parent FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} h ON t.tid = h.tid WHERE t.vid = %d ORDER BY weight, name', 't', 'tid'), $page_increment, 0, NULL, $vocabulary->vid);
-    $total_entries = db_query(db_rewrite_sql('SELECT count(*) FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} h ON t.tid = h.tid WHERE t.vid = :vid'), array(':vid' => $vocabulary->vid));
+    $total_entries = db_query(db_rewrite_sql('SELECT COUNT(*) FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} h ON t.tid = h.tid WHERE t.vid = :vid'), array(':vid' => $vocabulary->vid));
     while ($term = db_fetch_object($results)) {
       $key = 'tid:' . $term->tid . ':0';
       $current_page[$key] = $term;
