Count Filter is not Working
It's not `fn.filter()` -- you want `fn.COUNT(EventModel.id).filter(EventModel.status == 'cancelled')`

This is not a peewee issue, but rather an issue in incorrectly translating SQL to peewee APIs. That's exactly what I have... except it's BookingModel, not EventModel. It doesn't work. Apologies for the title being slightly off. Updated.

@coleifer  To clarify:

```python
peewee.fn.COUNT(BookingModel.id).filter(BookingModel.status != 'cancelled')
```
does not work. Works fine for me:

```python
class Person(Model):
    name = TextField()
    class Meta:
        database = db

class Pet(Model):
    person = ForeignKeyField(Person)
    animal = CharField()
    class Meta:
        database = db

db.create_tables([Person, Pet])

p1 = Person.create(name='Cat Lady')
p2 = Person.create(name='Dog Owner')
p3 = Person.create(name='Animal Lover')
Pet.create(person=p1, animal='Cat 1-1')
Pet.create(person=p1, animal='Cat 1-2')
Pet.create(person=p2, animal='Dog 2-1')
Pet.create(person=p2, animal='Dog 2-2')
Pet.create(person=p3, animal='Cat 3-1')
Pet.create(person=p3, animal='Dog 3-1')
Pet.create(person=p3, animal='Dog 3-2')
Pet.create(person=p3, animal='Fish 3-1')

query = (Person
         .select(Person.name,
                 fn.COUNT(Pet.id).filter(Pet.animal.startswith('Cat')).alias('cats'),
                 fn.COUNT(Pet.id).filter(Pet.animal.startswith('Dog')).alias('dogs'),
                 fn.COUNT(Pet.id).alias('total_pets'))
         .join(Pet, JOIN.LEFT_OUTER)
         .group_by(Person.name))
for p in query:
    print(p.name, 'cats:', p.cats, 'dogs:', p.dogs, 'all:', p.total_pets)
```

Prints

```
Animal Lover cats: 1 dogs: 2 all: 4
Cat Lady cats: 2 dogs: 0 all: 2
Dog Owner cats: 0 dogs: 2 all: 2
```
Referencing: https://stackoverflow.com/questions/60067772/from-rows-to-columns-using-peewee-orm

Event:Booking is a 1:many relationship.

I have a situation where I want to pull all Events that are still bookable just to generate a list.

```python
n_bookings = peewee.fn.COUNT(BookingModel.id)
query = EventModel.select(EventModel, n_bookings.filter(BookingModel.status != 'cancelled').alias('count')).join(
    BookingModel,
    peewee.JOIN.FULL_OUTER,
    on=(BookingModel.event_id == EventModel.id)
).group_by(
    EventModel
).having(
    having
).where(
    select_where
).order_by(
    EventModel.start_time.asc(),
    EventModel.id.asc()
).limit(canary_limit)
```

While appending on a filter doesn't break anything, it also seems to do nothing, as it is still counting bookings with a status of "cancelled".