Count digits wrong question

what is function?

function is not yet taught here .why it is here.

Don’t focus on function word. just think about it as a task.
your task is: you will be given a number and a digit, write a code that checks how many times this digit occurs in the number.
Thanks.