Validate error: XPathTypeMismatchException when doing count on value that is not a nodeset

I am receiving this error message, please help
Error: ODK Validate Errors:

Something broke the parser. See above for a hint.
Error evaluating field 'farmland_count' (${farmland_count}[1]): The problem was located in Calculate expression for ${farmland_count}
XPath evaluation: type mismatch
not a nodeset
Caused by: org.javarosa.xpath.XPathTypeMismatchException: The problem was located in Calculate expression for ${farmland_count}
XPath evaluation: type mismatch
not a nodeset
... 10 more

The following files failed validation:
${Form} 11.xml

Result: Invalid

Welcome @Dosu,
Can you share a related extract of your form, please? It seems that you use a wrong parameter for a function in your calculation. For functions see e.g. https://getodk.github.io/xforms-spec/#fn:Number-Functions.

@wroos Thanks. This is what i intend to do:
I possess data indicating the spatial distribution of households registered by each field agent. I intend to gather additional data to map the farmlands associated with these registered households. My objective is to calculate the number of farmlands mapped by each field agent, showcase checkmarks for each individually mapped farmland, and present the overall tally of farmlands mapped across all agents. See the extract form here. Thanks for your help.
extract.xlsx (58.1 KB)

Sorry, I cannot understand your logic/requirement in this extract. Is there a repeat grouping missing? Can you adapt the extract, please, or explain more?

count() is used for a repeated variable. (count-selected can be used for a select_multiple variable.) But in this extract you count on a select_one (with comparison).

Also, such syntax for "repeat" is not possible: concat(repeat(":heavy_check_mark: ", ...). Maybe you can better explain what you exactly want to do, please? Showing several / all repeats in a note?

I see that you have esri="https://esri.com/xforms" in your settings sheet. Are you using Survey123? Although Survey123 uses components that ODK produces, it also adds things that are not part of the ODK core spec. You will be better served by finding support for that product.

With core ODK, your count expression should probably use the count-selected function which you can read more about in the documentation. I expect the expression would be something like count-selected(${farmland_mapped}). There is no repeat function in core ODK.