It is obvious that electron-positron pair cannot annihilate to a single photon which will violate the momentum conservation. My question is can we get this knowledge from Feynman diagram or perturbative expansion of QED? If we can't, how can we make sure not to over-count diagrams when we draw Feynman diagram to compute the scattering amplitude?
If you want to see this from a straightforward implementation of the Feynman rules: You can always calculate the diagram for $e^- e^+ \rightarrow \gamma$ and for arbitrary momentum it will be nonzero. After all, this is how we calculate the effective vertex in a low energy effective Lagrangian in a theory like QED. When you go to calculate a physical result like a cross section though you will multiply this amplitude by a momentum conserving delta function. The delta function will won't have any support in the physical region so it will just kill the whole thing right there and you will get zero. So to answer your question, you don't have to worry about removing things like this by hand from your calculation, they will take care of themselves as long as you are careful.