COUNTIF using two conditions from data inside and outside the dataset
It's probably easiest to add another column with:

AND(A1=1,B1=1)


and then use

COUNTIF(Table 1::C,"=TRUE")


You can hide the extra column if you want by selecting the column's drop-down arrow and clicking "Hide Column".

Minimal example: https://www.icloud.com/iw/#numbers/BAJy4qiGzoTh1VSmyA-BZ16VCStKBAKb9pSE/TEST (link will be removed in 1 week)

PARTIAL SOLUTIONS:

Example using Fudge Tables: https://www.icloud.com/iw/#numbers/BAI89SfR5AMJFjId3zyBzaZuxCGzy9uGo5eE/Fudge_Tables.numbers

Example using Subtables: https://www.icloud.com/iw/#numbers/BAJMsEi-8NDWoPbLaxeBsLTzYZ2Mqnmqo5eE/Subtables

Note that Subtables has a problem with zeroes (0000 translates to a number in the subtable). The best solution (as I did) is to put something like an "X" in every space that doesn't have a number in it in the main table.

Of course, be sure to check the data. The biggest problem with these methods is that they're very manual labor intensive and are very error prone. I blazed through them pretty quickly so I easily could have made a mistake. Just be careful. ;)