Index: t/run/13oracle.tl
===================================================================
--- t/run/13oracle.tl	(revision 1417)
+++ t/run/13oracle.tl	(working copy)
@@ -7,7 +7,7 @@
   'Warning: This test drops and creates tables called \'artist\', \'cd\' and \'track\''
   unless ($dsn && $user && $pass);
 
-plan tests => 5;
+plan tests => 6;
 
 DBICTest::Schema->compose_connection('OraTest' => $dsn, $user, $pass);
 
@@ -56,7 +56,18 @@
 
 is($tjoin->next->title, 'Track1', "ambiguous column ok");
 
+# check count distinct with multiple columns
+my $other_track = OraTest::Track->create({ trackid => 2, cd => 1, position => 1, title => 'Track2' });
+my $tcount = OraTest::Track->search(
+    {},
+    {
+	select => [{count => {distinct => ['position', 'title']}}],
+	as => ['count']
+    }
+  );
 
+is($tcount->next->get_column('count'), 2, "multiple column select distinct ok");
+
 # test LIMIT support
 for (1..6) {
     OraTest::Artist->create({ name => 'Artist ' . $_ });
Index: t/run/01core.tl
===================================================================
--- t/run/01core.tl	(revision 1417)
+++ t/run/01core.tl	(working copy)
@@ -1,7 +1,7 @@
 sub run_tests {
 my $schema = shift;
 
-plan tests => 43; 
+plan tests => 44; 
 
 my @art = $schema->resultset("Artist")->search({ }, { order_by => 'name DESC'});
 
@@ -136,6 +136,15 @@
 
 cmp_ok($distinct_rs->all, '==', 4, 'DISTINCT search with OR ok');
 
+my $tcount = $schema->resultset("Track")->search(
+    {},
+    {
+	select => {count => {distinct => ['position', 'title']}},
+	as => ['count']
+    }
+  );
+cmp_ok($tcount->next->get_column('count'), '==', 13, 'multiple column COUNT DISTINCT ok');
+
 my $tag_rs = $schema->resultset('Tag')->search(
                [ { 'me.tag' => 'Cheesy' }, { 'me.tag' => 'Blue' } ]);
 
Index: lib/DBIx/Class/Manual/Cookbook.pod
===================================================================
--- lib/DBIx/Class/Manual/Cookbook.pod	(revision 1417)
+++ lib/DBIx/Class/Manual/Cookbook.pod	(working copy)
@@ -138,6 +138,8 @@
     }
   );
 
+  my $count = $rs->next->get_column('count');
+
 =head3 SELECT COUNT(DISTINCT colname)
 
   my $rs = $schema->resultset('Foo')->search(
Index: lib/DBIx/Class/Storage/DBI/Oracle.pm
===================================================================
--- lib/DBIx/Class/Storage/DBI/Oracle.pm	(revision 1417)
+++ lib/DBIx/Class/Storage/DBI/Oracle.pm	(working copy)
@@ -5,7 +5,7 @@
 
 use Carp qw/croak/;
 
-use base qw/DBIx::Class::Storage::DBI/;
+use base qw/DBIx::Class::Storage::DBI::Retarded/;
 
 # __PACKAGE__->load_components(qw/PK::Auto/);
 
Index: lib/DBIx/Class/Storage/DBI/Retarded.pm
===================================================================
--- lib/DBIx/Class/Storage/DBI/Retarded.pm	(revision 0)
+++ lib/DBIx/Class/Storage/DBI/Retarded.pm	(revision 0)
@@ -0,0 +1,51 @@
+package DBIx::Class::Storage::DBI::Retarded;
+
+use strict;
+use warnings;
+
+use base qw/DBIx::Class::Storage::DBI/;
+
+sub _select {
+  my ($self, $ident, $select, $condition, $attrs) = @_;
+
+  # hack to make count distincts with multiple columns work in SQLite and Oracle
+  if (ref $select eq 'ARRAY') { 
+      @{$select} = map {$self->replace_distincts($_)} @{$select};
+  } else { 
+      $select = $self->replace_distincts($select);
+  }
+
+  return $self->next::method($ident, $select, $condition, $attrs);
+}
+
+sub replace_distincts {
+    my ($self, $select) = @_;
+
+    $select->{count}->{distinct} = join("||", @{$select->{count}->{distinct}}) 
+	if (ref $select eq 'HASH' && $select->{count} && ref $select->{count} eq 'HASH' && 
+	    $select->{count}->{distinct} && ref $select->{count}->{distinct} eq 'ARRAY');
+
+    return $select;
+}
+
+1;
+
+=head1 NAME 
+
+DBIx::Class::Storage::DBI::Retarded - Some databases can't handle count distincts with multiple cols. They should use base on this.
+
+=head1 SYNOPSIS
+
+=head1 DESCRIPTION
+
+This class allows count distincts with multiple columns for retarded databases (Oracle and SQLite)
+
+=head1 AUTHORS
+
+Luke Saunders <luke.saunders@gmail.com>
+
+=head1 LICENSE
+
+You may distribute this code under the same terms as Perl itself.
+
+=cut
Index: lib/DBIx/Class/Storage/DBI/SQLite.pm
===================================================================
--- lib/DBIx/Class/Storage/DBI/SQLite.pm	(revision 1417)
+++ lib/DBIx/Class/Storage/DBI/SQLite.pm	(working copy)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use base qw/DBIx::Class::Storage::DBI/;
+use base qw/DBIx::Class::Storage::DBI::Retarded/;
 
 sub last_insert_id {
   return $_[0]->dbh->func('last_insert_rowid');
