How to Count Objects that meet a condition?

Hi, I’m trying to count the number of “offer” objects that have a relational field “avatar_id” that matches the current items ID (which is an Avatar)

In this it should actually only display 1, but its displaying the total number of offers in the offer array.

What am I doing wrong here?

Screenshot 2023-07-17 at 9.28.17 PM

length only returns the length of an array. You need to filter it first, and then get the length.
image