[Question]
  [
In this challenge you are asked to find in *how many ways* we can express a positive integer `n` as the sum of two positive integers `k` and the `reverse of k`.
Here is an example using `n = 1069` :  
`188 + 881 = 1069`  
`287 + 782 = 1069`  
`386 + 683 = 1069`  
`485 + 584 = 1069`  
`980 + 89 = 1069`  
So, the answer here would be `5`.
**rules**  
As you can see we count every pair once: `{188,881}` is the same as `{881,188}`.  
If a number cannot be expressed as such, your program should return `0`.  
Your program should take as `input` a `positive integer` and return an `integer`.
**test cases**
```
1 -> 0
2 -> 1 (this is 1 + 1 = 2)
22 -> 2         
101 -> 1 ( this is 100 + 001 = 100 + 1 = 101 )
132 -> 4
8547 -> 20
49886 -> 0
955548 -> 113
1100000 -> 450
```
This is `CodeGolf`! The shortest code in bytes, wins!
  
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 9 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
rHD·πö·∏å+∆≤‚Ç¨ƒã
```
A monadic Link that accepts a positive integer and yields the number of valid pairs distinct up to reversing
**[Try it online!](https://tio.run/##AR8A4P9qZWxsef//ckhE4bma4biMK8ay4oKsxIv///8xMDY5 "Jelly ‚Äì Try It Online")**
### How?
```
rHD·πö·∏å+∆≤‚Ç¨ƒã - Link: positive integer, N
 H        - halve {N} -> N/2
r         - {N} inclusive range {that} -> [N, N-1, ..., floor(N/2)]
       ‚Ç¨  - for each such "potential larger of the pair"*, X:
      ∆≤   -   last four links as a monad - f(X):
  D       -     convert {X} to decimal digits
   ·πö      -     reverse
    ·∏å     -     convert from decimal digits
     +    -     add {X}
        ƒã - count occurrences of {N}
```
\* Note: while odd \$N\$ *do* include one "potential larger of the pair" that *would not be* the larger of the pair (\$X=\lfloor \frac{N}{2} \rfloor\$), that value can *never* work. This is because \$N=\lfloor \frac{N}{2} \rfloor + \lceil \frac{N}{2} \rceil\$ and so \$\text{reverse}(X) - X = 1\$ but this isn't a multiple of \$9\$. (Thanks to [Neil](https://codegolf.stackexchange.com/users/17602/neil) for simplifying my explanation!)
[Answer]
# [R](https://www.r-project.org), 70 bytes
```
\(x)sum(sapply(x:(x/2),\(z)z%/%(b=10^(0:log10(z)))%%10%*%rev(b)+z)==x)
```
[Attempt This Online!](https://ato.pxeger.com/run?1=LYxBCsIwEABfE9jV1WZjUpNCrr6iCFaMlxZLayXmK16i4KP8jYI9DQzMPJ5DfgX_nq5hZT-7GiKOUwfjoe_bO8QKYqGQakiYRCGg8Sz3IKv2cmb5k4hCsBQLMZxu0OAyofcR55uaL0dgUqQUsWTijVqzLB1Zo7eknbUlOWOMtkhhLnP-8ws)
More or less an R translation of [@JonathanAllan‚Äôs Jelly answer](https://codegolf.stackexchange.com/a/269383/42248), so be sure to upvote that one too!
[Answer]
# [Vyxal 3](https://github.com/Vyxal/Vyxal/tree/version-3) `s`, 7 bytes
```
¬Ω‚åäz-·µõ·πÅ=
```
[Try it Online!](https://vyxal.github.io/latest.html#WyJzIiwiIiwiwr3ijIp6LeG1m+G5gT0iLCIiLCI4NTQ3IiwiMy40LjEiXQ==)
Port of [Jelly answer](https://codegolf.stackexchange.com/a/269383/106959)
-2 bytes thanks to [@pacman256](https://codegolf.stackexchange.com/users/96266/pacman256)
```
¬Ω‚åäz-·µõ·πÅ=¬≠‚Å°‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å§‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å°‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å£‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å°‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å¢‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å§‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å£‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Å°‚Äã‚Äé‚Äè‚Äã‚Å¢‚Å†‚Å°‚Äå¬≠
   -     ## ‚Äé‚Å°n -
¬Ω‚åäz      ## ‚Äé‚Å¢[0 .. floor(N / 2)]
    ·µõ·πÅ   ## ‚Äé‚Å£for every element n, n + mirror(n)
      =  ## ‚Äé‚Å§equals to itself? (vectorized)
## ‚Äé‚Å¢‚Å°The flag -s counts every Truthy values.
üíé
```
Created with the help of [Luminespire](https://vyxal.github.io/Luminespire).
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 9 bytes
```
/ec2m+s_`
```
[Try it online!](https://tio.run/##K6gsyfj/Xz812ShXuzg@4f9/QwMzSwA "Pyth ‚Äì Try It Online")
### Explanation
```
                 # implicitly assign Q = eval(input())
/ec2m+s_`ddQQ    # implicitly add ddQQ
    m      Q     # map lambda d over range(Q)
       _`d       #   reverse string(d)
      s          #   convert back to integer
     +    d      #   add d
  c2             # chop list into 2 parts of equal length
 e               # take the second part
/           Q    # count instances of Q
```
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), ~~16~~ 15 bytes
```
ÔºÆŒ∏Ôº©Œ£Ôº•‚Æå‚Ä¶¬∑‚äòŒ∏Œ∏‚ÅºŒ∫‚ÆåŒπ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/98zr6C0xK80Nym1SKNQ05oroCgzr0TDObG4RCO4NFfDN7FAIyi1LLWoOFXDMy85p7Q4syw1KDEvPVXDIzGnLDUFqElHoVATSLgWlibmFGtk6yjANGRqgoH1//@GBob/dctyAA "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Explanation:
```
ÔºÆŒ∏              First input as a number
      ‚Ä¶¬∑        Inclusive range from
         Œ∏      Input number
        ‚äò       Halved
          Œ∏     To input number
     ‚Æå          Reversed
    Ôº•           Map over values
            Œ∫   Current index
           ‚Åº    Equals
             Œπ  Current value
            ‚Æå   Reversed
   Œ£            Take the sum
  Ôº©             Cast to string
                Implicitly print
```
Reversing the range means the value plus index always equals the input number, so we just need to check that the latter is the reverse of the former.
[Answer]
# [Python 3](https://docs.python.org/3/), 56 bytes
```
lambda x:sum(i>=x-i==int(str(i)[::-1])for i in range(x))
```
[Try it online!](https://tio.run/##VYq9DsIgEIB3n@LGu6GJtKCUBF9EHTCKXmJpQzHBp0ddTG78fpZ3ecxpaNHDqT3DdLkGqG59TcgHXzv2nlPBtWRkOjrXqTPFOQMDJ8gh3W9YidqSfxdGVES0@VMvSaLaylkNsluj90Lo0dqdMKMxRtuvah8 "Python 3 ‚Äì Try It Online")
or [53 bytes Python2 by Fmbalbuena](https://tio.run/##VYpLCsIwEED3nmKWM4uCaRNNA/EiKjSi0QGbllghPX3UjTDL95nX5TGltkYPp/oM4@UaoLjXe0Q@@NKw95wWHHg4OteoM8UpAwMnyCHdb1iI6px/C0ZURLT5UytJotrKWXWyW6P3Quje2p0wvTFG26@qHw)
# [JavaScript (Node.js)](https://nodejs.org), 59 bytes
```
x=>(g=t=>t&&g(t-1)+!([...x-t+''].reverse().join``^t))(x>>1)
```
[Try it online!](https://tio.run/##bctNCsIwEEDhvbdw085QMjj@UDfJRURpqWloKYkkQ8nto2vJ9uO9ddzHNMXlI8qHty2zLlkbcFq0kaZxIIqxO8KDiLKSrm2fFO1uY7KAtIbFD8NLECEbw1im4FPYLG3BAczAiHj4s3PNasin2s6XWnu/Xfsfly8 "JavaScript (Node.js) ‚Äì Try It Online")
-1 Byte from Arnauld
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 40 35 bytes ([SBCS](https://github.com/abrudz/SBCS))
```
{+/‚çµ=10‚ä•¬®(‚åΩ+‚ä¢)¬®10‚ä•‚ç£¬Ø1¬®¬Ø1+(‚åä‚çµ√∑2)+‚ç≥‚çµ}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///v1pb/1HvVltDg0ddSw@t0HjUs1f7UdcizUMrwCKPehcfWm94aAWQ0AbKdQGVHt5upKn9qHczkFn73@1R2wSKTOB61DcVaIabgiGcZYRgIZiGBggFhsYIcQtTE3M4x8TSwsIMzrM0NTU1sUDoMjQAgf8A "APL (Dyalog Unicode) ‚Äì Try It Online")
37 **32** with `‚éïIO‚Üê0`:
```
{+/‚çµ=10‚ä•¬®(‚åΩ+‚ä¢)¬®10‚ä•‚ç£¬Ø1¬®(‚åä‚çµ√∑2)+‚ç≥‚çµ}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qG@qp/@jtgkG/6u19R/1brU1NHjUtfTQCo1HPXu1H3Ut0jy0AizyqHfxofWGYPEuoLLD2400tR/1bgYya/@7AfWTrZsL6AKgfjcFQzjLCMFCMA0NEAoMjRHiFqYm5nCOiaWFhRmcZ2lqampigdBlaAAC/wE "APL (Dyalog Unicode) ‚Äì Try It Online")
[Answer]
# [Uiua](https://uiua.org) [SBCS](https://tinyurl.com/Uiua-SBCS-Jan-14), 19 bytes
```
/+=+‚ãï‚àµ‚áå¬∞‚ãï.-+1‚á°‚åä√∑2..
```
[Try it!](https://uiua.org/pad?src=0_8_0__ZiDihpAgLys9K-KLleKIteKHjMKw4ouVLi0rMeKHoeKMisO3Mi4uCgpmIDEKZiAyCmYgMjIKZiAxMDEKZiAxMzIKZiA4NTQ3CmYgNDk4ODYKIyBmIDk1NTU0OAojIGYgMTEwMDAwMCAjbWlnaHQgdGFrZSBhIGZldyBzZWNvbmRzCg==)
```
/+=+‚ãï‚àµ‚áå¬∞‚ãï.-+1‚á°‚åä√∑2..
                 .. # duplicate input twice
              ‚åä√∑2   # halve and floor
             ‚á°      # range
           +1       # increment
          -         # subtract from input
         .          # duplicate
       ¬∞‚ãï           # unparse (convert to array of boxed strings)
     ‚àµ‚áå             # reverse each
    ‚ãï               # convert all to integers
   +                # add reversed to non-reversed
  =                 # where is it equal to input?
/+                  # sum
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 7 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
;≈∏D√≠+QO
```
[Try it online](https://tio.run/##yy9OTMpM/f/f@ugOl8NrtQP9//83NDCzBAA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfeXhCf@tj@5wObxWO9D/v87/aEMdIx0jIx1DA0MdQ2MjHQtTE3MdE0sLCzMdS1NTUxMLHUNDAxCIBQA).
**Explanation:**
```
;        # Halve the (implicit) input-integer
 ≈∏       # Pop and push a list in the range [(implicit) input, floor(input/2)]
  D      # Duplicate this list
   √≠     # Reverse each inner value in the copy
    +    # Add the values at the same positions in the lists together
     Q   # Check for each whether it equals the (implicit) input
      O  # Sum the amount of truthy values
         # (which is output implicitly as result)
```
[Answer]
# [Ruby](https://www.ruby-lang.org/), 46 bytes
```
->x{(x/2..x).count{x==_1+_1.digits.join.to_i}}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=PY9NCsJADIX3OUXAjUU7JmNHp4v2IiLFv-q4sGKnUCmexE0RPYYH8TaOTjUkvEDyvZDr_VQtz-0tTx6VzUP9EmFaN_16JIWoA7EqqoNt6iTJeJCxWJutsaXYF-YgbJGZy6WjnjOmSTwEHvbCFAnkVxn7dmdKdMk4cJWgDED6ocRfABP_9vEPEDmE6AP53neMAfDYW0SgVTT1bgRRrPWkux8rpSLtTXkM7BxceEgRzMVmsdo1R8xnGc-7J9rW6xs)
[Answer]
# [Zsh](https://www.zsh.org/), 48 bytes
```
for ((i=$1;i-->$1/2;c+=`rev<<<$i`+i==$1)):
<<<$c
```
[Attempt This Online!](https://ato.pxeger.com/run?1=m724qjhjwYKlpSVpuhY3DdLyixQ0NDJtVQytM3V17VQM9Y2sk7VtE4pSy2xsbFQyE7QzbYGSmppWXCB-MkQfVPvSaENjo1goBwA)
Terribly slow, because to reverse a string in Zsh you have to spawn a process!
[Answer]
# [Perl 5](https://www.perl.org/), 48 bytes (30 bytes w/o args or return)
```
($x,$n)=(0,@_);$x+=$_+reverse==$n for$n/2..$n;$x
```
[Try it online!](https://tio.run/##RY/tboIwFIb/cxVvTA0QG0aVOpQ08z62xUCoH1GraYVhjNfOWulcf73nOec8J71IfeS9aSocDrj3EekoUbGIUrpaxwXpJoKsJ1q2UhspBFHYnDVRb9MkIcq2@0cQWIIoAD4ZRfpNXZpSMJ9snA6RpeyF2czy7I/PFxR8KHKevdsN78kWeT5/WRec8yy3Djbzmyx1z5q4G4lxt/R0Q0RKvaUgsrvEEFiRdTE0iJbGAvtVN@HgRe/VdYORak6V1BjnNczu3Bxr7MpWYsxr/JQ3kyQJxuZLjdxd4N/va5sgxNP/BMAHwvMh9MUSxh8Kq7IusN23Ui2f9r0yV1nWIR2WH0H/Cw "Perl 5 ‚Äì Try It Online")
[Answer]
# [Desmos](https://desmos.com/calculator), 80 bytes
```
f(k)=‚àë_{n=.5k}^k0^{(k-n-‚àë_{d=0}^n10^{floor(logn)-d}mod(floor(n/10^d),10))^2}
```
[Try It On Desmos!](https://www.desmos.com/calculator/0fsrpn47bg)
[Try It On Desmos! - Prettified](https://www.desmos.com/calculator/ewf3fokdys)
[Answer]
# [Scala 3](https://www.scala-lang.org/), 53 bytes
```
x=>(x/2 to x).count{i=>i+i.toString.reverse.toInt==x}
```
[Attempt This Online!](https://ato.pxeger.com/run?1=ZU-7TsMwFN37FVedbJGGpE1ap5IjMSIBC4KlqoSbOsUotZHjlKCq_8DO0oUufFH_hpsHUy37Puxzzj3-PpWZKMTkdzEcafMhrB4uzy9m9SYzB_dCadgPANYyhy02RNhNOYcba8Xn4tFZpTdLOocnrRzwFgmwEwVkptLuWRRq_VBtV9Iih9xqx1MMFJE_lctH7BzXPCX19RicgZr6LWuveKqulO9Mp-9buUMBiReNAq8PPfnrf5juRqDsnSodCYNp4kHowRg3njDAOpxgxeJo5kGUMDb1IInjOGL4EgbNoq33XsrPjZUieyXYA0_hHY24QpOLbzUAShvuYdD7Oh67_Ac)
]