[Question]
  [
In this task you will take as input a non-negative integer \$n\$, and output the number of pairs of non-negative integers \$a,b\$ such that both are palindromes\*, \$a \leq b\$, and \$a+b = n\$. For example if \$n\$ is \$22\$ then the valid pairs are
\$
\begin{array}{c|c}
a & b \\
\hline
0 & 22 \\
11 & 11 \\
\end{array}
\$
So the output is \$2\$.
As another example, if \$n\$ is \$145\$ then the valid pairs are
\$
\begin{array}{c|c}
a & b \\
\hline
4 & 141 \\
44 & 101 \\
\end{array}
\$
So the output is 2.
Your submission should be a program or function. Answers will be scored in bytes with fewer bytes being the goal.
## Test Cases
\$
\begin{array}{c|c c|c}
\mathrm{Input} & \mathrm{Output} & \mathrm{Input} & \mathrm{Output} \\
\hline
0 & 1 & 12 & 5\\
1 & 1 & 13 & 4\\
2 & 2 & 14 & 4\\
3 & 2 & 15 & 3\\
4 & 3 & 16 & 3\\
5 & 3 & 17 & 2\\
6 & 4 & 18 & 2\\
7 & 4 & 19 & 1\\
8 & 5 & 20 & 1\\
9 & 5 & 21 & 0\\
10 & 5 & 22 & 2\\
11 & 5 & 23 & 1\\
\end{array}
\$
[OEIS A260254](http://oeis.org/A260254)
---
\* In base 10
  
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 9 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
≈ª≈í·∏Ç‚Ç¨·∏ã·πö$Hƒä
```
A monadic Link accepting a non-negative integer which yields a non-negative integer.
**[Try it online!](https://tio.run/##ASAA3/9qZWxsef//xbvFkuG4guKCrOG4i@G5miRIxIr///8xMg "Jelly ‚Äì Try It Online")**
### How?
Counts all pairs without the \$a\leq b\$ restriction, halves and rounds up. Note that the halved count is only a fraction if \$\frac n 2\$ is a palindrome and in such cases we want to count this \$a=b\$ pair.
```
≈ª≈í·∏Ç‚Ç¨·∏ã·πö$Hƒä - Link: integer, n    e.g. 22
≈ª         - zero-range               [0,1,2,...,9,10,11,12,...,21,22]
   ‚Ç¨      - for each:
 ≈í·∏Ç       -   is palindrome (digits) [1,1,1,...,1,0,1,0,...0,1]
      $   - last two links as a monad:
     ·πö    -   reverse                [1,0,...,0,1,0,1,...,1,1,1]
    ·∏ã     -   dot-product           3  (=1√ó1+1√ó0+...+1√ó0+1√ó1+0√ó1+...+0√ó1+1√ó1)
       H  - halve                   1.5
        ƒä - ceil                    2
```
[Answer]
# JavaScript (ES6), ~~¬†74¬†~~ 73 bytes
```
n=>(g=a=>a>n-a?0:![a,n-a].some(n=>[...n+''].reverse().join``-n)+g(-~a))``
```
[Try it online!](https://tio.run/##DcnBCsIwDADQ@74inpbQNQy9qZ0fMgYtsxsbmkgru4j@et3twVvDFvKYltfbit5jmVwR1@HsgutCJzbc2vOhD82ugbM@I@7dM7OYuh44xS2mHJF41UW8t0JmRvsLRN6XSRMKOGgvIHB1cDztMIbgUwGMKlkfkR86ozQwoRBV3/IH "JavaScript (Node.js) ‚Äì Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), ~~73 70~~ 63 bytes
```
lambda n:sum(`n-v`+`v`==(`v`+`n-v`)[::-1]for v in range(n/2+1))
```
**[Try it online!](https://tio.run/##RYvNCsIwEITvPsXemlCj/bktpC9ihY1otGC2JaYBKX32mJyc0zcfM8s3vGbuktVjeht3uxtg/KxOEKtINUXSWlCh0uUFUbVXO3uIMDF4w8@H4HNXt1Kmovmv@6aReICcxU8cqg2Hfgc1wLZXp7x1Jgg@ghWcvz8 "Python 2 ‚Äì Try It Online")**
Note that:
```
(string_a == reverse(string_a)) and (string_b == reverse(string_b))
```
is equivalent to
```
reverse(string_a + string_b) == (string_b + string_a)
```
(where `+` is concatenation)
[Answer]
# [Prolog (SWI)](http://www.swi-prolog.org), 99 bytes
```
N-C:-aggregate_all(count,(between(0,N,A),B is N-A,B=<A,+A,+B),C).
+N:-atom_codes(N,C),reverse(C,C).
```
[Try it online!](https://tio.run/##Pc5LCoMwEAbgvadwGXFGTHyXdqHucwWxdgiCNUVtPb5NsQnM4mNe/K9FT1rhuo/HIbG9YK/UQqrfqOuniQ36PW/A7rTtRDOLQUIdQOOPqy@xhuZ2rSE01QTQBpEXSvNg089u0A9amTRNWOhDy0qs/W0ch@@zGHkAngG3SFCcSDE5kVnkmJ4oLErMTlQWPHbiTsIpsZc8dXL/ee5U2BS8dKpsROFSC47xX8LuicRMoy8 "Prolog (SWI) ‚Äì Try It Online")
# Ungolfed Code
After adding white space, this solution reads very similarly to the challenge specification. It simply asks for the number of pairs palindrome integers within specified bounds that sum to N. 
```
count_splits(N,C) :- 
  aggregate_all(count,(
    between(0,N,A),
    B is N-A, B=<A,
    palindrome(A),
    palindrome(B)
  ),C).
palindrome(N) :-
  atom_codes(N,C),
  reverse(C,C).
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 10 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
√ùŒµ√ÇQ}√Ç*O;√Æ
```
Port of [@*JonathanAllan*'s Jelly answer](https://codegolf.stackexchange.com/a/198823/52210), so make sure to upvote him as well!
[Try it online](https://tio.run/##yy9OTMpM/f//8NxzWw83BdYebtLytz687v9/QxNTAA) or [verify all test cases](https://tio.run/##ASkA1v9vc2FiaWX/MjPGkk4/IiDihpIgIj9O/8OdzrXDglF9w4IqTzvDrv8s/w).
**Explanation:**
```
√ù        # Push a list in the range [0, (implicit) input-integer]
 Œµ       # Map each value to:
  √Ç      #  Bifurcate the value; short for Duplicate & Reverse copy
   Q     #  And check if it's equal to the value itself (1 if a palindrome; 0 if not)
 }√Ç      # After the map: bifurcate the entire list as well
   *     # Multiply the values at the same indices in the lists
    O    # Take the sum of that
     ;√Æ  # And then halve and ceil it
         # (after which the result is output implicitly)
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 44 bytes
```
{+grep {.flip eq[R,] $_},(^$_ Z($_...$_/2))}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYPu/Wju9KLVAoVovLSezQCG1MDpIJ1ZBJb5WRyNOJV4hSkMlXk9PTyVe30hTs/Z/cWKlQm5iAVCnjoKhnp6R8X8A "Perl 6 ‚Äì Try It Online")
Finds the number of pairs of numbers such that the reverse of the string representation is equal to the string representation of the reversed pair.
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 18 bytes
```
Ôº©Ôº¨Œ¶‚äï‚äòŒ∏‚¨§Ôº©‚ü¶Œπ‚ÅªŒ∏Œπ‚üß‚ÅºŒª‚ÆåŒª
```
[Try it online!](https://tio.run/##JYqxCgIxDEB/pWMKdRB0chJRFBSOW8Wh1OAFYqRprr8fD@4tb3ivTFnLL7P7oCQGp9wM7igfm@BCbKhwk6L4RTF8wzVzX1RjTOHIvO5PSuFBMjeoKVB8Le1c58wNOIURO2pD4LhycN/u9r7p/Ac "Charcoal ‚Äì Try It Online") Link is to verbose version of code. The halved input has to be incremented because `a` needs to vary over the inclusive range from `0` to `n/2`. Explanation:
```
     Œ∏              Input `n`
    ‚äò               Halved
   ‚äï                Incremented
  Œ¶                 Filter over implicit range
        ‚ü¶           Begin list
         Œπ          Current index `a`
           Œ∏        Input `n`
            Œπ       Current index `a`
          ‚Åª         Subtracted (i.e. `b`)
             ‚üß      End list
       Ôº©            Vectorised cast to string
      ‚¨§             Both strings satisfy
                 Œª  Current string
                ‚Æå   Reversed
               Œª    Current string
              ‚Åº     Are equal
 Ôº¨                  Length
Ôº©                   Cast to string for implicit print
```
[Answer]
# Python 3.8, ~~89~~ ~~87~~ ~~68~~ 66 bytes
Adapting [Jonathan's clever answer](https://codegolf.stackexchange.com/a/198824/75323) to Python 3 (with f format strings) and removing `[]` for a generator expression instead of list comprehension, we shave 21 bytes with
```
lambda n:sum(f"{i}{n-i}"==f"{n-i}{i}"[::-1]for i in range(n//2+1))
```
[Try it online](https://tio.run/##RczBCgIhGATge0/x40kJWayIEOxF2g5GWT@0s2LbYRGf3fTUnGa@w8R1ec3Yn2KqgdxY33663T3Bfr6TDCJzydBchHNt9NZEXKzV5kphTsTEoOTxfEgMw25rlKrd8XdzOCq7oZaYGEt/RSF9phwkVBGq/gA)
My old answer:
```
lambda n:len([i for i in range(n//2+1)if(s:=str(i))==s[::-1]and(t:=str(n-i))==t[::-1]])
```
You can [try it online](https://tio.run/##JclNCsIwEAbQq8xyBikl/oAEcpLaRaSNDtSvYTIbTx/Bbt@rX3/vuNyr9ULp0bf8eS6ZELcVPCmV3UhJQZbxWhnjeD4F0cItpubGKpJSm2IcwpyxsB@M4R9@xCy9msK5cLjeRPoP)
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), ~~70 69~~ 67 bytes
-2 thanks to Arnauld (change each string cast from `x+''+y` to `x+[y]`)
I don't really know much JavaScript, I based this around Arnauld's answer, any advice is very welcome!
```
n=>(g=a=>(v=n-a)<a?0:(v+[a]==[...a+[v]].reverse().join``)+g(-~a))``
```
**[Try it online!](https://tio.run/##DcbBCsIwDADQ@74ix4S6MvSmi35IKTTMdmyMVDrpRfTX6y6Pt0qVfSrL691rfsaWuCnfcWY5rKy90CiP4YrVOPHMzlorxlXvbYk1lj0i2TUvGgKZGfufEIXQUi6owDDcQGFkOF@OGEPw6QCmrHveot3yjHqChErUfdsf "JavaScript (Node.js) ‚Äì Try It Online")**
Note that:
```
(string_a == reverse(string_a)) and (string_b == reverse(string_b))
```
is equivalent to
```
reverse(string_a + string_b) == (string_b + string_a)
```
(where `+` is concatenation) 
[Answer]
# [PHP](https://php.net/), ~~83~~ ~~86~~ ~~85~~ 73 bytes
```
for(;$i<=$argn/2;$i++)$k+=strrev($j=$argn-$i)==$j&&strrev($i)==$i;echo$k;
```
[Try it online!](https://tio.run/##K8go@G9jX5BRoPA/Lb9Iw1ol08ZWJbEoPU/fCMjW1tZUyda2LS4pKkot01DJgkjpqmRq2tqqZKmpwSTA/Ezr1OSMfJVs6///jQz/5ReUZObnFf/XdQMA "PHP ‚Äì Try It Online")
-13 bytes and bug fix thanks to @640KB
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~114~~ \$\cdots\$ ~~105~~ 98 bytes
Saved 7 bytes thanks to [rtpax](https://codegolf.stackexchange.com/users/85545/rtpax)!!! 
```
i;m;p(n){for(i=0,m=n;i=i*10+n%10,n/=10;);n=i==m;}r;a;f(n){for(a=r=0;a<=n/2;)r+=p(a)*p(n-a++);n=r;}
```
[Try it online!](https://tio.run/##Nc3BCoMwEIThe54iCELWKEZ7HPdNegm2lhyylcWexGdPtdDrwPfP3L3muZSEjNUJ7ctbXeLQZhYkTs0QvNRDaKXnIYAgnJgzDkXE8geRlQPixNKPIPW8ukjN2eui95dRHCXHJI52Y38Xslk5jUzjDd4LGWtXPdfFVfXjLlV7xQnG6nP7qNgAc5jyBQ "C (gcc) ‚Äì Try It Online")
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `l`, 63 [bitsv2](https://github.com/Vyxal/Vyncode/blob/main/README.md), 7.875 bytes
```
¬Ω Ä2('·∏Ç‚Åº;-
```
[Try it Online!](https://vyxal.pythonanywhere.com/?v=2#WyJBbD0iLCIiLCLCvcqAMign4biC4oG8Oy0iLCIiLCIwXG4xXG4yXG4zXG40XG41XG42XG43XG44XG45XG4xMFxuMTFcbjEyXG4xM1xuMTRcbjE1XG4xNlxuMTdcbjE4XG4xOVxuMjBcbjIxXG4yMlxuMjMiXQ==)
Bitstring:
```
000100100000010110000001100101111001000100100001100010110111001
```
## Explained
```
¬Ω Ä2('·∏Ç‚Åº;-¬≠‚Å°‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å°‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å§‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å£‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å°‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å¢‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å£‚Å™‚Äè‚Å†‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å¢‚Å§‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å§‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å°‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Å°‚Äã‚Äé‚Äé‚Å™‚Å°‚Å™‚Å†‚Å™‚Å£‚Å°‚Å™‚Äè‚Äè‚Äã‚Å°‚Å†‚Å°‚Äå‚Å¢‚Å¢‚Äã‚Äé‚Äè‚Äã‚Å¢‚Å†‚Å°‚Äå¬≠
¬Ω Ä         # ‚Äé‚Å°Push the range [0, input / 2] for later
  2(       # ‚Äé‚Å¢Twice:
    '·∏Ç‚Åº;   # ‚Äé‚Å£  Filter the top of the stack by is palindromic
        -  # ‚Äé‚Å§  And subtract that from the input.
        -  # ‚Äé‚Å¢‚Å°  This acts as a check for pairs, by keeping numbers that are palindromes before and after subtraction
# ‚Äé‚Å¢‚Å¢The l flag outputs the length of the top of the stack
üíé
```
Created with the help of [Luminespire](https://vyxal.github.io/Luminespire).
Only took me around [3 and a half years to finally write this answer](https://chat.stackexchange.com/transcript/106764?m=54128072#54128072). Things sure have changed since then.
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), 14 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
)rm√ë_x^m√ÖŒµ*Œ£)¬Ω
```
[Try it online.](https://tio.run/##y00syUjPz0n7/1@zKPfwxPiKuNzDree2ap1brHlo7///BlyGXEZcxlwmXKZchgZcRkZcRsZchiamAA)
**Explanation:**
```
)               # Increase the (implicit) input-integer by 1
 r              # Pop and push a list in the range [0, input+1)
  m√ë            # Check for each value whether it's a palindrome (1 if truthy; 0 if falsey)
    _           # Duplicate this list
     x          # Reverse the copy
      ^         # Zip the two together to create pairs
       m        # Map over each pair,
        √Ö       # using the following two commands:
         Œµ      #  Reduce by:
          *     #   Multiplying
           Œ£    # Then take the sum of this list
            )   # Increase this sum by 1
             ¬Ω  # And integer-divide it by 2
                # (after which the entire stack joined together is output implicitly)
```
[Answer]
# [Perl 5](https://www.perl.org/) `-p`, 51 bytes
```
$\+=($,==reverse$,)&&$_==reverse;++$,<=--$_&&redo}{
```
[Try it online!](https://tio.run/##K0gtyjH9/18lRttWQ0XH1rYotSy1qDhVRUdTTU0lHs631tZW0bGx1dVViVdTK0pNya@t/v/f0OBffkFJZn5e8X9dX1M9A0OD/7oFAA "Perl 5 ‚Äì Try It Online")
]