There's a very good chance I've made several errors here, but this might get you started:
We seek the final score of a:b.
We'll first consider the rounds when Team A scores independently from the rounds when Team B scores. (I'm assuming that only one team can score per round, and one team MUST score; the scoring team can earn one or two points [never zero].)
If Team A earned only one point in each of its scoring rounds, it would need a rounds to achieve a points. In general, it needs at most a scoring rounds, and at least ceil(a/2) scoring rounds.
Let n1 be the number of scoring rounds where Team A scores one point, and n2 the number of two-point rounds; clearly a = 1*n1 + 2*n2, with 0 <= n1 <= a, 0 <= n2 <= floor(a/2), and the total nrounds = n1 + n2.
For a given pair of n1 and n2, the number of possible ways for Team A to achieve a points is (n1 + n2)!/(n1!*n2!) (I think; please correct me if I'm wrong...). [To compute this, I thought about how to assign the values 1:nrounds to two groups: one with n1 spots, and one with n2 spots.]
To compute the above, consider the function:
function out = nways(score)
N2 = 0:floor(score/2);
out = NaN(numel(N2), 2);
for k = 1:numel(N2)
n2 = N2(k);
n1 = score - 2*n2;
out(k, :) = [n1 + n2, factorial(n1 + n2)/(factorial(n1) * factorial(n2))];
I haven't had time to verify the rest, but see if this code dump works. I'll try to check back on Monday.
a = 2;
b = 2;
out_a = nways(a);
out_b = nways(b);
count = 0;
for ka = 1:size(out_a, 1)
nrounds_a = out_a(ka, 1);
nways_a = out_a(ka, 2);
for kb = 1:size(out_b, 1)
nrounds_b = out_b(kb, 1);
nways_b = out_b(kb, 2);
count = count + nways_a*nways_b*factorial(nrounds_a + nrounds_b)/(factorial(nrounds_a) * factorial(nrounds_b));