Allowances are calculated as your total deductions divided by the tax year's personal exemptions. As mentioned above it is a multiplier.
For 2015 the standard deduction for a married couple filing jointly is $12,600 and each of you gets 1 personal exemption ($4,000 in 2015). That's a total of $12,600 + 2*($4,000) or $20,600. Divide this by the personal exemption and you get roughly 5 allowances.
Now say your employer offers health insurance and a 401(k) plan. Your total health insurance (or "cafeteria" contributions) are $2,000 for the year, and your total 401(k) plan contributions are $6,000 for the year. This would give an additional $2,000 + $6,000 = $8,000 divided by $4,000 = 2 allowances. Thus you would file with 7 allowances.
Note that tax credits are not included in the allowance calculation. That is because they do not affect your taxable income but rather directly reduce your taxes due.