How can I calculate how many back links referenced to a particular page?

Yeah you run into a text vs reference sort of issue.
I also learned better how to get the set data to work when properties use page references.
The translation from name to original-name is necessary as in your property value it is the original-name and in the input value it is the name.
Instead of clojure.string/includes? you can also use contains? and not use text-values.

[?p :block/properties ?prop]
[(get ?prop :parent) ?parent]
[(contains? ?parent ?page-name)]