Miners will make money from transaction fees. As with everything else in the bitcoin protocol, this is a beautiful self-regulating mechanism: Transactions attach a fee of any size (or no fee), to motivate miners to process the transaction.
If there were to be fewer miners to the extent that transaction time becomes a problem, people will attach higher fees to transactions to get them to complete quicker, which increases the profit from mining, which makes more people want to mine, etc. etc.