You would apply $10 of the loss from trade number 2 to the cost basis of trade number 3. So you didn't buy one share for $100, you bought 1 share for $110. Then when you sold it at $110, after the wash sale adjustment you have no loss, you do have a loss of $20 from trade number two which you can deduct against your gain of $10 from transaction number 1; leaving a net loss of $10 assuming you don't buy this security again within 30 days.
For wash sale purposes, transaction number 1 isn't terribly relevant because it results in a gain. The wash sale is transaction number 3 because you have to adjust the cost basis of transaction number 3 to account for the loss you realized in transaction number 2 because you initiated transaction number 3 within 30 days of the sale in transaction number 2. If you open another position (position 4) within 30 days of transaction number 2 you'll have to make a similar cost basis adjustment account for the remaining $20 loss.
Additionally, it's worth pointing out that wash sales are about loss realization. The government wants its cut of gains immediately, but in a wash sale you have to postpone your realization of losses. You don't get your loss immediately in the event of a loss, but the government wants its part of your gain immediately in the event of a gain.
You cannot deduct losses from sales or trades
of stock or securities in a wash sale
It looks like 2016 is the most current revision year for the "Investment Income and Expenses" IRS publication. Wash sale rules start on page 58.
This is the quote that matters to you:
If your loss was disallowed because of the
wash sale rules, add the disallowed loss to the
cost of the new stock or securities (except in (4)
above [witch references IRAs]). The result is your basis in the new stock
or securities. This adjustment postpones the
loss deduction until the disposition of the new
stock or securities. Your holding period for the
new stock or securities includes the holding period
of the stock or securities sold.
This is the example illustrating your basic situation:
Example 1. You buy 100 shares of X stock
for $1,000. You sell these shares for $750 and
within 30 days from the sale you buy 100
shares of the same stock for $800. Because
you bought substantially identical stock, you
cannot deduct your loss of $250 on the sale.
However, you add the disallowed loss of $250
to the cost of the new stock, $800, to obtain
your basis in the new stock, which is $1,050.
To address your comment, it looks like the number of shares does matter, the rule is here:
More or less stock bought than sold. If the
number of shares of substantially identical stock
or securities you buy within 30 days before or
after the sale is either more or less than the
number of shares you sold, you must determine
the particular shares to which the wash sale
rules apply. You do this by matching the shares
bought with an equal number of the shares
sold. Match the shares bought in the same order
that you bought them, beginning with the
first shares bought. The shares or securities so
matched are subject to the wash sale rules.