Your formula will count anything that is not "D". COUNTA was the original
formula which counts non-blanks. I assuming the OP wants to count all
non-blank cells that are NOT "E".
Either mine or Gary"s Student's suggestion should do the trick.
You've been given a couple of suggestions that work, including one that uses
COUNTA. Did they not work? You may need to elaborate on what you're trying
to do.