Absolutely. Smoking can affect the numbers of sperm and how well they swim. Smoking can also impact the seminal fluid which is ejaculated with the sperm. It can also damage the DNA in the sperm cell, to not allow the sperm to fertilize the egg as well.
Read more about specific health habits and other factors that impact male fertility.