Comment 1 for bug 765731

Fixed in in SVN trunk :

    @Test
    public void Count() {
        assertToString("(select count(cat) from Cat cat)", sub().from(cat).count());
    }

    @Test
    public void Count_Via_List(){
        assertToString("(select count(cat) from Cat cat)", sub().from(cat).list(cat).count());
    }

    @Test
    public void Count_Name() {
        assertToString("(select count(cat.name) from Cat cat)", sub().from(cat).list(cat.name).count());
    }

    @Test
    public void Count_Multiple_Sources() {
        QCat other = new QCat("other");
        assertToString("(select count(cat, other) from Cat cat, Cat other)", sub().from(cat, other).count());
    }

    @Test
    public void Count_Multiple_Sources_Via_List() {
        QCat other = new QCat("other");
        assertToString("(select count(cat, other) from Cat cat, Cat other)", sub().from(cat, other).list(cat, other).count());
    }