TLDR: LTCG are counted, but neither side of the comparison is quite as you described
If your total income is below a certain limit, long-term capital gains are taxed with 0% (again, up to a certain limit).
Not quite. If your taxable income is less than the top end of the 12% bracket (for 2019 $39,475 for single or MFS, $52,850 for HoH, $78,950 for MFJ or widow(er)) then any net longterm capital gains (realized and thus reported, as noted in comments), and also any 'qualified' dividends, within that amount are taxed at 0%. If your taxable income is above that limit, but your taxable-at-ordinary-rate income is less, then the portion of LTCG+QD that 'fits' between the end of your ordinary-rate income minus deductions (next) and the end of the 12% bracket is taxed at 0%, and the portion that 'fits' in the next several brackets is taxed at 15% instead of the normal bracket rates from 22% to 32%. Unless you are subject to the Alternative Minimum Tax, which may change all of this. Plus if your AGI (further adjusted in some cases) exceeds a significantly higher threshold ($200k single or HoH, $125k MFS, $250k MFJ or widow(er)) then all types of 'investment' income within that excess -- both long and short cap gains, qualified and unqualified dividends, interest and more -- is subject to a 3.8% surtax, the Net Investment Income Tax, also due to PPACA.
Taxable income is what the tax return calls 'total income' -- which isn't really total as it already excludes some items, like 'muni' bond interest (see below) -- minus a number of deductions which can be substantial depending on your situation. This is computed in two stages; first you subtract some deductions that are categorized as 'adjustments', giving your 'adjusted gross income' (AGI, see below), then you subtract either the standard deduction for your filing status or a different set of 'itemized' deductions, at your choice. (One exception: if a married couple files separately, either both or neither must itemize. But if you file separately you usually can't get PPACA subsidy at all.)
OTOH eligibility for (and the amount of) the PPACA subsidy, formally the Premium Tax Credit, is based on your household modified AGI (MAGI) compared to 100% to 400% of the Federal Poverty Level (FPL): this figure adds the MAGI of any dependents who file their own tax returns, uses AGI which has had some deductions subtracted (but does include the cap gains you ask about), and adds some items that are not included even in 'total income' for income tax purposes, specifically:
interest on tax-exempt bonds, traditionally called 'municipals' or 'munis' for short, even though almost none are issued by cities nowadays
foreign earned income that you excluded on form 2555 (which only applies if you worked and lived in a foreign country at least most of the year -- and PPACA subsidy is only for coverage purchased on the 'marketplace' which only allows (legal!) US residents)
the nontaxable portion of Social Security benefits (which for people in households below 400% FPL will often be most or all of them -- but most Social Security recipients are old enough for Medicare, which automatically counts as 'minimum essential coverage', making them ineligible for PPACA subsidy)
See the instructions for form 8962 line 2a and 2b (also available in PDF, along with the form, here).
(I needed to learn about this because I'm in possibly the same situation as you: during enrollment before the beginning of the year I projected I would be eligible, and requested APTC accordingly, but I ended up ineligible due to cap gains and will have to pay it back. Although since my prior year liability was zero, I can delay payment until April without penalty, FWIW.) (update: due to COVID the repayment was further delayed until July. Not that it makes much difference.)