Retrieving number of events for a project

Hello.

I’d like to retrieve the number of events for a particular project, in a particular timeframe.

In other words, I’d like to answer such a question:

How many errors were there in the ‘Foo’ project, in the last 5 hours?

I assume it’d be possible somehow via postgres or Redis. I’m just looking for the easier way (I’d prefer Redis).

Thanks in advance.