Add formula to count if related to a different excel sheet


Im kind of new in AppSheet and Im having issues creating an app to manage a building (departments), hopefully someone can help me.

I have 2 sheets in my excel file, the first one called “2021 TABLE” is to capture who has given the maintenance payment and the date. This sheet is populated with a form that I created in AppSheet.

I want the second sheet in my excel file (called “INCOME”) to capture automatically the qty of people that payed each month and the total $ income.

I tried to insert a COUNTIF formula in the excel file to count how many “ok” are appearing by month in order to calculate the people paying each month, but the app showed me an error relating the formula, Im not sure if AppSheet doesn’t allow to insert formulas in the excel sheet relating one sheet with another one.

So I tried to do this directly in the AppSheet web, I mean, trying to insert the formula there but to be honest I don’t know how to relate one table with another one since I will need to get the qty of people paying from my first sheet in order to use it in the second one,

Can someone please help?