Search result within text field

Please help me. How can I display the result of this search within the text (#text3) in a dynamic page (Photo)?

$w(“#text3”).value = num;

Hello Mike,
This way?

wixData.query(“Survey”)
.eq(“fruit”, “grape”)
.count()
.then( (num) => {
let numberOfItems = num;
$w(“#text3”).value = num;
console.log("count: " + numberOfItems) ;
} )
.catch( (error) => {
let errosMsg = error.message;
let code = error.code;
} );

Leandro, were you able to make it work?

Hi shlomi

I’ll try it today. … I used fruit as an example so that someone could understand it more easily.
I own a course with 12 classes. Each class has a specific time. Every day I get leads with interested parties informing which class they prefer. The data is entered through a form linked to the wix database.
I wanted to know the total amount of interested in each of the 12 classes and display the 12 results on a single page as if it were a report. I’ve done several wix sites, but I’m not a programmer, so I have difficulty with the codes.

Leandro,

so you are trying to create a poll? did you look at https://www.wix.com/app-market/poll/overview for example?

Shlomi

Ummmm I’ll take a look