Select count of each entry

Hi everybody.
I have a measurement called “request” which this tag value: “filePath”, “hostIp”, “logName” and I want to get the number of times that every file has been requested.
Something like this:
File1 5
File2 6
File3 0
And so on
I tried:
SELECT COUNT(filePath) FROM request GROUP BY(filePath)
But I get the same result as SELECT COUNT(*) FROM request
if I try SELECT COUNT(filePath), filePath FROM request GROUP BY(filePath)
I get an error because mixing aggregate and non-aggregate queries is not supported.

So now I don’t know if this type of query isn’t possible in influxDB (I’m new with it) or if I’m doing something wrong.