How can I mathematically count the number of rows in a truth table of n-inputs that will satisfy a certain boolean condition?
For example, say I have a 4-input truth table that will in turn have 16 rows. The inputs are $A, B, C, D$, and I wish to mathematically count how many rows satisfy (ie. evaluate to TRUE) the following condition:
$A + BD + BC + CD$
I understand that exactly $8$ rows would satisfy the first condition $A$ and exactly $4$ rows would satisfy the condition $BD$, however I would have to subtract the common rows between the two conditions $ABD$ and this would get messy rather quickly when I would try to evaluate the entire condition.
Algorithmically, this is the #SAT problem (also known as Sharp-SAT). The general problem statement is: given a propositional logic formula $\phi(x_1,\dots,x_n)$ on $n$ boolean variables $x_1,\dots,x_n$, count the number of satisfying assignments. In other words, count the size of the set $\{(x_1,\dots,x_n) : \phi(x_1,\dots,x_n)\}$.
The #SAT problem is known to be NP-hard, which (likely) means there is no general algorithm for this problem that is efficient.
If $n$ is small, you can enumerate all $2^n$ assignments and check which ones are satisfying assignments, but this becomes inefficient very quickly as $n$ becomes large. If $\phi$ has some special structure, you may be able to count the number of satisfying assignments more quickly than enumerating them, but this requires cleverness, and it is believed there is no general technique (no technique that works for all $\phi$) to do this efficiently.
Nonetheless, there has been significant work on heuristics and techniques for solving the #SAT problem. Those techniques might prove effective enough in practice for many conditions that you run into in practice (because in practice the condition often has some structure that can be exploited to speed up the counting process). There's a rich and detailed literature on this subject in the computer science literature, too deep to cover in this answer, but if you search for research on #SAT, you should find some entry points into the literature.
This question would probably be better asked on the Computer Science or Theoretical Computer Science sites -- you'll get better answers there. For example, see the following questions, which address aspects of this:
#SAT Solver download
Is there a sometimes-efficient algorithm to compute the number of satisfying assignments for a boolean formula?
Starting SAT solver papers
What is the counting complexity of random 2-SAT?
If you just want to get the answer rapidly for a particular formula, your best bet is to find an existing #SAT solver and use it. It'll implement sophisticated techniques, but you don't need to know how those techniques work to use the solver and (with any luck) get an answer.