Naive Bayes' Classification and Using the Entire Vocabulary in the Denominator
If you're using Laplace smoothing, you'll replace the count with a "pseudocount", and that won't be zero.  So, it does make a difference.