Number of queries with response time slower than 3ms using pt-query-digest

I want to know how many queries have response time more than 3 milliseconds. How can I know that using pt-query-digest ?
I’m using ‘–type tcpdump’ and everything works fine but really don’t know how to create a rule to get both “total number of queries” and “total number of queries with response time more than 3ms”.
Any help would be appreciated.

I found the answer myself:
You can do it using --filter ($event->{Query_time} > 0.003 ? $event->{Slow_queries}++ : $event->{Ok_queries}++) || 1