<PROGRAM NAME HERE>, tell me how many character '
<CHARACTER HERE>'/s are there in your body.
I do not think it a dupe to this. That question asks for printing a list directly but this one requires some input that will cause problem.
Your work is to write a quine-like program/function that takes an input of one character, and respond with a number telling how many times that character occurs in your program. Comments, indents, trailing spaces, line feeds all count.
‘Ȯß, so part of the non-ASCII input MUST also be acceptable.
For example, if your program is in pure ASCII and only LF
foo(bar,baz)#there is a space-> do things
The inputs and outputs should be:
- \n -> 1
- \r -> 0
- \t -> 0
- \x01 through \x09 -> 0
＋(U+FF0B) -> undefined behaviour (you can even destroy everything or delete the program itself furiously)
The program with least characters wins.