Why switch the order of the parameters? I think it's more common you want to customize the count expression than you need to explicitly specify the DB connection.