https://romankurnovskii.com/ru/tracks/algorithms-101/leetcode/easy/1773/
1773. Count Items Matching a Rule