[Question]
  [
[The Goldbach conjecture](https://en.wikipedia.org/wiki/Goldbach%27s_conjecture) states that every even number greater than two can be expressed as the sum of two primes. For example,
```
4 = 2 + 2
6 = 3 + 3
8 = 5 + 3
```
However, once we get to 10 something interesting happens. Not only can 10 be written as
```
5 + 5
```
but it can also be written as
```
7 + 3
```
Since 10 can be expressed as the sum of two primes *two ways*, we say that the "Goldbach partition" of 10 is `2`. Or more generally, 
> 
> The Goldbach partition of a number is the total number of distinct ways of writing `n = p + q` where `p` and `q` are primes and `p >= q`
> 
> 
> 
Your challenge is to write a program or function that finds the Goldbach partition of a number. Now, technically the term "Goldbach partition" is used only to refer to even numbers. However, since the odd integer **p + 2** can *also* be expressed as the sum of two primes if **p > 2** is prime, we will extend this to all positive integers ([A061358](https://oeis.org/A061358)).
You may safely assume that your input will always be a positive integer, and you may take input and output in any of our [default allowed methods](http://meta.codegolf.stackexchange.com/questions/2447/default-for-code-golf-input-output-methods), for example function arguments and return value, STDIN and STDOUT, reading and writing to a file, etc.
The Goldbach partitions of the positive integers up to 100 are:
```
0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 2, 1, 2, 0, 2, 1, 2, 1, 3, 0, 3, 1,
3, 0, 2, 0, 3, 1, 2, 1, 4, 0, 4, 0, 2, 1, 3, 0, 4, 1, 3, 1, 4, 0, 5, 1, 4,
0, 3, 0, 5, 1, 3, 0, 4, 0, 6, 1, 3, 1, 5, 0, 6, 0, 2, 1, 5, 0, 6, 1, 5, 1,
5, 0, 7, 0, 4, 1, 5, 0, 8, 1, 5, 0, 4, 0, 9, 1, 4, 0, 5, 0, 7, 0, 3, 1, 6
```
As usual, standard loopholes apply, and the shortest answer in bytes wins!
  
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 8 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
_√ÜR√ÜPSHƒä
```
[Try it online!](http://jelly.tryitonline.net/#code=X8OGUsOGUFNIxIo&input=&args=MTAw) or [verify all test cases](http://jelly.tryitonline.net/#code=X8OGUsOGUFNIxIoKMTAww4figqzFk3M0Rw&input=).
### How it works
```
_√ÜR√ÜPSHƒä  Main link. Argument: n (positive integer)
 √ÜR       Prime range; yield [2, 3, 5, ..., n].
_         Subtract all primes in this range from n.
   √ÜP     Compute the primality of the resulting differences.
          This returns 1 for each prime p such that n - p is also prime.
     S    Compute the sum of the resulting Booleans.
      H   Divide it by 2, since [p, n - p] and [n - p, p] have both been counted.
       ƒä  Ceil; round the resulting quotient up (needed if n = 2p).
```
[Answer]
## Python 2, 76 bytes
```
g=lambda n,k=2:n/k/2and all(x%i for x in[k,n-k]for i in range(2,x))+g(n,k+1)
```
Recursively crawls up from `k=2` to `n/2`, adding up values where both `k` and `n-k` are prime. It would be nice to count `n` down at the same time instead, but this has a problem that `k=0` and `k=1` are falsely called prime:
```
g=lambda n,k=0:n/k and all(x%i for x in[k,n]for i in range(2,x))+g(n-1,k+1)
```
The primality check is trial-division, shortened by checking both `k` and `n-k` together. I found this to be shorter than using a Wilson's Theorem generator (79 bytes):
```
f=lambda n,k=1,P=1,l=[]:n/k and P%k*(n-k in l+P%k*[k])+f(n,k+1,P*k*k,l+P%k*[k])
```
The idea for this one is to keep a list of all primes in the bottom half to be checked by the time we get to the top half, but for the midpoint `k=n/2`, we haven't had time to add `n-k` to out list when we get to `k`. An iterative version gets around this, but is 82 bytes:
```
n=input()
s=P=k=1;l=[]
while k<n:l+=P%k*[k];s+=P%k*(n-k in l);P*=k*k;k+=1
print~-s
```
[Answer]
# [MATL](http://github.com/lmendo/MATL), 8 bytes
```
tZq&+=Rz
```
[**Try it online!**](http://matl.tryitonline.net/#code=dFpxJis9Uno&input=MTAw)
### Explanation
Consider input `8` as an example
```
      % Take input implicitly
t     % Duplicate
      % STACK: 8, 8
Zq    % All primes up to that number
      % STACK: 8, [2 3 5 7]
&+    % Matrix with all pairwise additions
      % STACK: 8, [4  5  7  9
                   5  6  8 10
                   7  8 10 12
                   9 10 12 14]
=     % True for entries that equal the input
      % STACK: [0 0 0 0
                0 0 1 0
                0 1 0 0
                0 0 0 0]
R     % Extract upper triangular part (including diagonal). 
      % This removes pairs that are equal up to order
      % STACK: [0 0 0 0
                0 0 1 0
                0 0 0 0
                0 0 0 0]
z     % Number of nonzero entries
      % STACK: 1
      % Display implicitly
```
---
It's interesting to observe the **graph of the sequence**, using a slightly modified version of the code:
```
:"@       % Input n implicitly. For each k from 1 to n, push k
tZq&+=Rz  % Same code as above. Pushes the result for each k
]v'.'&XG  % End. Concatenate all results into a vector. Plot as dots
```
For input `10000` the result is
[![enter image description here](https://i.stack.imgur.com/xZuXR.png)](https://i.stack.imgur.com/xZuXR.png)
You can try it at [**MATL Online**](https://matl.io/?code=%3A%22%40tZq%26%2B%3DRz%5Dv%27.%27%26XG&inputs=3000&version=19.3.0) (Refresh the page if the "Run" button doesn't change to "Kill" when pressed). It takes several about 25 seconds to produce the graph for input `3000`; inputs above a few thousands will time out.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 6 bytes
```
;√ÖP-pO
```
[Try it online!](https://tio.run/##yy9OTMpM/f/f@nBrgG6B////hgYA "05AB1E ‚Äì Try It Online")
Explanation:
```
                  # implicit input (example: 10)
;                 # divide input by 2 (5)
 √ÖP               # primes up to that ([2, 3, 5])
   -              # subtract from the implict input ([8, 7, 5])
    p             # isPrime? ([0, 1, 1])
     O            # sum (2), implicit output
```
[Answer]
# Regex `üêá` (ECMAScript[RME](https://github.com/Davidebyzero/RegexMathEngine/) / Perl / PCRE), ~~38~~ ~~33~~ 32 bytes
```
^(xx+)(?=\1(x*))(?!\2?(xx+)\3+$)
```
[Try it on replit.com!](https://replit.com/@Davidebyzero/regex-Goldbach-partitions) - ECMAScript (RegexMathEngine)  
[Try it online!](https://tio.run/##RU9BTsMwELz3FcZaVV6ctHFROdRxnUrlyqk3UqwStZIl04Y4SEEhHHkAT@QjwQlIXFY7s7O7M@Wxcsv@@Y1AJUnrLsXBEZjLAFW63ew2625yulQMvEpkupbYEnsKCNuysuea0PxMZUcyp3zpbM1oTCP/@uTrsGKiWEQCjy@DSP@zSeBxBQblcMuHj4cqc@kC28w9iL0KNdnLbkLI@Nn@EWBTNQpCxzm2UARLhNGGNmBRfcyZXkGFTOuWcyiipMMhh59OR6uj0xBDSPJrHeyMku/PL0JnUAThexh1nTF391tj@kfWNDwcu2Kza6ZVLgBRj1x@wwFz0fdJvFje/gA "Perl 5 ‚Äì Try It Online") - Perl  
[Try it online!](https://tio.run/##hVXrTuNGFP6fpzh4tzATOzQGdYViTEQhEki7sMoGdbtALWOPk9E6Y8seL5eKv32APmIfpPTMJYkhkWpFzlzO@c7tO8dJWfamSfLyLmUZFww@n4xHe9HJ5ekouro4n0S/nZ9OzuCg846LJG9SBodlUrG93dlRJ5nFFUTl9S2EMHZ@vb//frff/P74@HUy@3A/Iy9/kIcHl5LhFtntkmF447@ndKjPbvbd9/TGf6FvlRwPumUYla4ftCzWsuJiqkyuzniBpyyeH63JHXW4kFDiUkasqoqKJIWoJWh3u3NW1/GUUfizlulgkKAEHB6CPVZLfc5EmgdQMdlUAvzgeQ1T7ZMiZR7cFUUORZjFea1gtRkLd733y4fboAP48AyIzlw0ZRYjslLE4BCT@quTs@PxQZfaSw9q/sSKjCwd/3lx0pKnlGor6iEFDE0QSdFIGMAyUKrCc7QaaA8G4LwJXis7Dmo5N8Khy3xkeVPPTCTLpHSeO42o@VSwFPJCTM0rFvU9qwKdsPljlMR5jm7Y2O0uusuL5Dt0Ew9@FDyFbhrLGHOnkqSWEIZA1E2Xbq8wqMV23WVl@rYy85gLggDawfIaiZAzQUra82/DfmBCMOyAMgkdMhw4Aa7csDR/DtL0RFGV4nmDiPt7kcSioq6Cn@JCQ7eBuCgbqdR1YFhC6FZssZ/HMplFOpbuam3QKlY3ufRMCQLbcV/Ov430SZbVDC8xXgxhKmevBLrFD5ZI1LKVwM5b2J@XPGfEkuLL58mYlsluEqGzhHoW49tofBlNRuNP5xfHk9Hp4nj0dTK6OFX7be2T/bee9OmKwVsVEtDmvt0N@m3lWqGHa9mIcB9LFmVVMY/KWEpWCVIhyy@uPn60AG0dbF3JHiQmcbEKN91bWLKGghEsKbiA8Fq89Dbx7C2AMZXzOW@D9HwatIRSVsr/FapY0lQ1L8RGQW02KyrQ0@VpyVycGDnOZmIamQvPcI8GC8br8qCK6GN6YllwogUW5cf6C9@Dsqjx2tzgrE/JTm/HGlWP8FVuUWYrbPN8MBDqcLgBF1wt74JPcWCI/grLzFplTrB7s7sWvuvfBjhs5pgJUnuw87CjHMME1Xh5G7b0l0ngoVA9eBgKPwDX5e2IF6R8ooBOKSNk50ZgSJg6lNb8zIjzUwr//PU34KeF45UZIehYy5rpJdWUr9mlidnuKHSaY0Po34rTuLZlpMGacwb3sA/b29bGVmi7bjy@HEcXl5@OJydn9JWipl@rvRYTQ1YNe2OD4VdnTXc1/XF@24g3THL1PHdW702NlVWMkVV86w1tBJZ72p6I5hJnxnJgm0jw0/HS7@HH8d8ky@Np/dLLtVLv4D8 "C++ (gcc) ‚Äì Try It Online") - PCRE2
Takes its input in unary, as a string of `x` characters whose length represents the number. Returns its output as the number of ways the regex can match. (The rabbit emoji indicates this output method.)
```
^                     # tail = N = input number
(xx+)                 # \1 = conjectured first prime, automatically asserted
                      #      to be ‚â• 2;
                      # tail = N-\1 == conjectured second prime
(?=
    \1                # tail -= \1; assert that second prime ‚â• first prime;
                      # since the first prime is ‚â• 2, this automatically
                      # asserts the second also to be so.
    (x*)              # \2 = tail == N-2*\1 == tool to make tail = \1
)
(?!                   # Assert there is no way to make the following match:
    \2?               # either leave tail unchanged, or tail = \1
    (xx+)\3+$         # Assert that tail is composite (which is only the same
                      # as being not prime for numbers ‚â• 2)
)
```
# Regex `üêù` (ECMAScript 2018 or better), 36 bytes
```
(?<=(x+x))(?=\1(x*))(?!\2?(xx+)\3+$)
```
Returns its output as the number of matches.
[Try it online!](https://tio.run/##TY7NToNAFIVfBYnJ3OuUCdToAjpl5aKbLnQpJp3AlF4DAw7TlvRn6wP4iL4IUqNJdyf5zjn53tVOdbml1gWmKfRwkGFi5bMun/oWXpwlUwqr9qsB0pmEnveIkMosgv7ukm6yaQp9zzG757c4rERXUa4hmgQRTljJMLH6Y0tWA7NaFRUZzVDkY3Z6YZy2azXWj2TarYtb2@S660TnCjJnFI0B9ruYVHJ@LGUlurYiBywYf2kNYGQpKm1Kt8H59HSibqmWQLJVtru8Q/kaviH@A30NzDxKo/iC0W1ss/cXZqcqKjyrTKljz@dVsm4sJDSTOiHO8VhLv/eF1e0oD4SiVi7fgMXkyrvZOrG35DTAIWWZYTFjyIkz7/vzy2Mc6rT@U45DxOQgo/MZhzCYPjz@AA "JavaScript (Node.js) ‚Äì Try It Online") - ECMAScript 2018  
[Try it online!](https://tio.run/##JY5NboMwEIX3nGI66sITDMKJ2gXU4iAhi0iYxJIZkPHCyQF6gB6xF6F2s3vS@97P@gj3hU@7ndfFB9gem/TmZmIHXntE3EX/pUUsI5Ho9aBEPGT1Nhx7EWNJw6l8pz2BZ9VW6tLBUzfFtHhwYDnX1VsYLbcFOO3qbXU2CKyQCsgQZ8hf@WaE5SDcubmQfKlURqWiFAQ7wbOF1WcjBdOE6mDWzrD4/1pPlserc8JLwIgHpky9eJb4@/2DcpaGR41Ie1MdPz7/AA "Python 3 ‚Äì Try It Online") - Python (`import [regex](https://bitbucket.org/mrabarnett/mrab-regex/src/hg/)`)  
[Try it online!](https://tio.run/##RY9BboMwEEWv4lojYcd1BFTtItQiUtc9AbBA1AmWzBiBI6xEbHuAHrEXoRC16urP@5r5mt@7SQ9jq61dYFDFoM86VIcD6okdo4Xlr4oFEThnuSoTFnbb9FCmOQtB8PJJAF@i4yN9c11vrP6gPIOrirOTG3TdtAwsMUjAYH/x/Aa1AivH3hpPJc3MiUG9b9wFvbSepNuCUFAXcTWvAQxQFQZ9dXcyQGn1HycbC7FedAqG/Xvtm1aPLArRDpDfk6/8Ng3Ga9m60c/rV0n2z0SiWztag5pQQPL9@UWAQbe3Gs@@/RVO53mJZfr88gM "PowerShell ‚Äì Try It Online") - .NET
# Regex `üêù` (ECMAScript 2018 or better / Java), 37 bytes
```
(?<=^(xx+))(?=\1(x*))(?!\2?(xx+)\3+$)
```
[Try it online!](https://tio.run/##TY7NToNAFIVfBRuTuVfKBGp0AZ2yctFNF7oUTScwnV4DAw7TlvRn6wP4iL4I0kaT7k7ud@7J9yG3ss0tNS4wdaH6vQgTK56VfuoaeHGWjOZW7pY9pFPxDl3nI0Iqsgi6u3O6ySbp5Zrd@7fYL3lbUq4gGgcRjplmmFj1uSGrgFkli5KMYsjzITs1N07ZlRzqBzLNxsWNrXPVtrx1BZkT8toAu3yMSzE7aFHytinJAQuGXVoBGKF5qYx2a5xNjkdqF3IBJBpp2/M66NfwDfEfqGtgZlEaxWeMbm3r3WhutrKkwrPSaBV7I79MVrWFhKZCJeT7eKjEqBtxq5pBHgh5JV2@BovJlXe9cXxnySmAfcoyw2LG0CefeT9f3x7zoUqrP@U4REz2IjqdsA@DycPjLw "JavaScript (Node.js) ‚Äì Try It Online") - ECMAScript 2018  
**[Try it online!](https://tio.run/##bVLLbtswELznKzZCA5N@MHaK9lCaMNqiBQI0bZEcbRegJcqmQ1EqScVKglz7Af3E/oi7lNVHAOuy3N3RLGe4W3knR9vsdq@LqnQBtpgzXbI@h/8rddDmaM2ptWqwc1LVK6NTSI30Hq6ktvAIXc0HGTDclTqDAjvkJjht1yDd2s@XFMLGlTsPH5pUVUGX@OcJwEdtFOTCql17JAlLy0wx7CeUv6vzXDmVXSuZKQerFva8SP782aU5pbyb64eB7zaRnxAvVqhBZp@0VYTSU2FrY6jOiWfqey2NJ8l5v99PKH18Dj0wEBKOEjwiQ/jLgATnyLBC3C33A9Fb2F6MgT8dak9fZQjKWXCiO6HaoooDPOXoxqosjZIWHkSOjIrDTSqtRenaVnUAAVFtVyM39z6ogmlLOXQ6WxjbSP9ZNQGv2VoM0Bli8O7IcQBZRHQSu/58CQbbEcV8ZXQgyQgfAfEB7Bg7lzbgGjhWSecVJsTMx0s6BDs52mRG2XXYTC9gBhEJbzBMlsiYbqSbL5tOT5vZyZLDW@fkvWe5NoY0w17Ta00ByEsXteE1hB1zsFNhJxgGAxR4JUO6QYcKZHOsOGSk3VyLC/4eyQ8bw3ZOVqQbkZbV/Zf8Wtq1wknjoaW4N2BKdCkVBb60r03whCKwRi3RhZw80M7yEv3bOR0UiU9M@YMIro6v9a9doaMhJ8lZBr9@/ISzLEGfhpBS/oTfSVy2PZlNxTfSNANKyUwsJqTpx9Pp4mLWVhcvBy/oPm7Vfjy6ePX6Nw "Java (JDK) ‚Äì Try It Online") - Java**  
[Try it online!](https://tio.run/##JY7BrcIwEETvqWJZ/YNNnCgGwSHBSiEEJKQ4YMnZRI4PhgIo4Jf4G8m34TbaeTOz89M/JtqvZpwn52F5LsLpuw4NOOUQcWXtSV1ZCDnnrFWdZGGb1KbbtZ9rt89/@BrJs6wLeWngpapsmBxYMJT6ysX3huoMrLLlMlvjGRbIM0gQJcjd6K6ZIc/subpw8VWxjOeSxyCYAV41zC4ZMRgnZAOjsprY59lyMNTfrGVOAAbcEk/UlyeBf@9fFKPQ1CtEvlbF7nD8Bw "Python 3 ‚Äì Try It Online") - Python (`import [regex](https://bitbucket.org/mrabarnett/mrab-regex/src/hg/)`)  
[Try it online!](https://tio.run/##RY/RaoQwEEV/JQ0DJmsjq6V9WBtc6HO/QC2IO7sGYiIxi7KLr/2AfmJ/xKq09Gnuucxc7nR2QNc3qPUMTuYOLziWh4PBgR2DmWWv8oONY8g5y2QRs3G3qociyTa3eAqBz8Hxkb7ZtlMaT5SncJP79GwdVnXDQBNlCCjTXT2/QyVBi77TylNBU3VmUEW1vRovtCfJuhBKqPJ9OS0BDIzMlfHl5qRghMY/jlcOw@WileCi98rXDfYsGIMdGL4l3/h9cMqjaGzvp6VVnP4zEcYuT2plkFAw5PvziwCDNtJoLr75HZxO07wXyfPLDw "PowerShell ‚Äì Try It Online") - .NET
[Answer]
# JavaScript (ES6), ~~77~~ ~~73~~ 70 bytes
*Saved 3 bytes thanks to @Arnauld*
```
f=(n,x=n)=>--x<2||n%x&&f(n,x)
g=(a,b=a>>1)=>b>1?f(b)*f(a-b)+g(a,b-1):0
```
`f` is a primality-test function; the relevant function is `g`.
`f` works by recursively counting down from **n-1**; the control flow at each stage goes like this:
* `x<2||` If **x < 2**, the number is prime; return **1**.
* `n%x&&` Otherwise if **n mod x = 0**, the number is not prime; return `n%x`.
* `f(n,x-1)` Otherwise, the number may or may not be prime; decrement **x** and try again.
`g` works in a similar fashion, though with not so much control flow. It works by multiplying **f(b)** by **f(a-b)** for each integer **b** in the range **[2, floor(a/2)]**, then summing the results. This gives us the number of pairs that sum to **a** where both numbers in the pair are prime, which is exactly what we want.
[Answer]
## [GAP](http://www.gap-system.org), 57 bytes
```
n->Number([2..QuoInt(n,2)],k->IsPrime(k)and IsPrime(n-k))
```
I don't think GAP has a shorter way than this obvious one. `Number` counts how many elements of a list satisfy a predicate.
Using it to compute the first 100 values:
```
gap> List([1..100],n->Number([2..QuoInt(n,2)],k->IsPrime(k)and IsPrime(n-k)));
[ 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 0, 1, 1, 2, 1, 2, 0, 2, 1, 2, 1, 3, 0, 3, 1, 
  3, 0, 2, 0, 3, 1, 2, 1, 4, 0, 4, 0, 2, 1, 3, 0, 4, 1, 3, 1, 4, 0, 5, 1, 4, 
  0, 3, 0, 5, 1, 3, 0, 4, 0, 6, 1, 3, 1, 5, 0, 6, 0, 2, 1, 5, 0, 6, 1, 5, 1, 
  5, 0, 7, 0, 4, 1, 5, 0, 8, 1, 5, 0, 4, 0, 9, 1, 4, 0, 5, 0, 7, 0, 3, 1, 6 ]
```
[Answer]
# [Brachylog](http://github.com/JCumin/Brachylog), 22 bytes
```
:{,A:B>=.:#pa+?,.=}fl
```
[Try it online!](http://brachylog.tryitonline.net/#code=OnssQTpCPj0uOiNwYSs_LC49fWZsCg&input=MTAw&args=Wg)
### Explanation
A straight up transcription of the problem.
```
:{                }f       Find all valid outputs of the predicate in brackets for the Input
                    l      Output is the number of valid outputs found
  ,A:B>=.                  Output = [A, B] with A >= B
         :#pa              Both A and B must be prime numbers
             +?,           The sum of A and B is the Input
                .=         Label A and B as integers that verify those constraints
```
[Answer]
# Mathematica, 52 bytes
```
Count[IntegerPartitions[#,{2}]//PrimeQ,{True,True}]&
```
The result is provided as an anonymous function. Try to plot a graph over it:
```
DiscretePlot[
 Count[IntegerPartitions[#, {2}] // PrimeQ, {True, True}] &[i], {i, 1,
   1000}]
```
[![plot of the sequence](https://i.stack.imgur.com/9A3kT.png)](https://i.stack.imgur.com/9A3kT.png)
By the way, the code has the same length with function version of demo code on OEIS.
[Answer]
# [05AB1E](http://github.com/Adriandmen/05AB1E), ~~10~~ 8 bytes
Extremely inefficient.
```
D!f-pO;√Æ
```
[Try it online!](http://05ab1e.tryitonline.net/#code=RCFmLXBPO8Ou&input=OA)
or [Try a less efficient way of generating primes](http://05ab1e.tryitonline.net/#code=RExEcMOPLXBPO8Ou&input=OTY)
**Explanation**
`n = 10` used as example.
```
D          # duplicate
           # STACK: 10, 10 
 !         # factorial
           # STACK: 10, 3628800
  f        # unique prime factors
           # STACK: 10, [2,3,5,7]
   -       # subtract
           # STACK: [8,7,5,3]
    p      # is prime
           # STACK: [0,1,1,1]
     O     # sum
           # STACK: 3
      ;    # divide by 2
           # STACK: 1.5
       √Æ   # round up
           # STACK: 2
           # implicit output
```
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 6 bytes
```
¬Ω~√¶-√¶‚àë
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyIiLCIxMDDGmyIsIsK9fsOmLcOm4oiRIiwiO1xcLGoiLCIiXQ==) Includes header and footer to produce first 100 results.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 12 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
HR√∞,_@√ÜP√∞√ó/S
```
**[TryItOnline](http://jelly.tryitonline.net/#code=SFLDsCxfQMOGUMOww5cvUw&input=&args=MjI)**  
**[1-100](http://jelly.tryitonline.net/#code=SFLDsCxfQMOGUMOww5cvUwrCs8OH4oKs&input=)**
### How?
```
HR√∞,_@√ÜP√∞√ó/S - Main link: n    e.g. 22
H            - halve
 R           - range          [1,2,3,4,5,6,7,8,9,10,11] (note this will be 1 to n//2)
  √∞          - dyadic chain separation
   ,         - pair with
    _@       - n -           [[1,2,3,4,5,6,7,8,9,10,11],[21,20,19,18,17,16,15,14,13,12,11]]
      √ÜP     - is prime? (1 if prime 0 if not)
                            [[0,1,1,0,1,0,1,0,0,0,1],[0,0,1,0,1,0,0,0,1,0,1]]
        √∞    - dyadic chain separation
         √ó/  - reduce with multiplication
                             [0,0,1,0,1,0,0,0,0,0,1]
           S - sum           3
```
[Answer]
## Racket 219 bytes
```
(let*((pl(for/list((i n) #:when(prime? i))i))(ll(combinations(append pl pl)2))(ol'()))(for/list((i ll))(define tl(sort i >))
(when(and(= n(apply + i))(not(ormap(Œª(x)(equal? x tl))ol)))(set! ol(cons tl ol))))(length ol))
```
Ungolfed: 
```
(define(f n)
 (let* ((pl                                   ; create a list of primes till n
          (for/list ((i n) #:when (prime? i))
            i))
         (ll (combinations (append pl pl) 2)) ; get a list of combinations of 2 primes
         (ol '()))                            ; initialize output list
    (for/list ((i ll))                        ; test each combination
      (define tl (sort i >))
      (when (and (= n (apply + i))            ; sum is n
                 (not(ormap (lambda(x)(equal? x tl)) ol))) ; not already in list
        (set! ol (cons tl ol))))              ; if ok, add to list
    (println ol)                              ; print list
    (length ol)))                             ; print length of list
```
Testing: 
```
(f 10)
(f 100)
```
Output: 
```
'((5 5) (7 3))
2
'((97 3) (89 11) (83 17) (71 29) (59 41) (53 47))
6
```
[Answer]
# [Actually](http://github.com/Mego/Seriously), 11 bytes
```
;R`p`‚ñë@-‚ôÇbŒ£
```
[Try it online!](http://actually.tryitonline.net/#code=O1JgcGDilpFALeKZgmLOow&input=MTA)
Explanation:
```
;R`p`‚ñë@-‚ôÇbŒ£
 R`p`‚ñë       prime values in [1, n]
;     @-     subtract each value from n
        ‚ôÇb   convert each value to boolean
          Œ£  sum
```
[Answer]
## Haskell, 73 bytes
```
f n|r<-[a|a<-[2..n],all((<2).gcd a)[2..a-1]]=sum[1|p<-r,q<-r,q<=p,p+q==n]
```
Usage example: `map f [1..25]` -> `[0,0,0,1,1,1,1,1,1,2,0,1,1,2,1,2,0,2,1,2,1,3,0,3,1]`.
Direct implementation of the definition: first bind `r` to all primes up to the input number `n`, then take a `1` for all `p` and `q` from `r` where `q<=p` and `p+q==n` and sum them.
]