Count Rows via RestAPI?

I’d like to be able to use the REST API to count the number of rows based on a filter, and then return only the number of rows (instead of having to bring all of the rows into the app and count them there).

Is there a way to do this?