You have 9 outs for this hand, the fact that other players may hold some of your outs is irrelevant.

When computing pot

odds you do not factor in your opponents cards, you only factor in those that are visible.

So after a flop with two diamonds, with you holding 2 in your hand, there ar 9 other diamonds in the deck (unseen cards).

Your chance of hitting the flush is # of outs / # of unseen cards or in this case:

9 / (52 - 2 in your hand - 3 on board = 47)

So you have 19.15% chance of hitting your flush, or just under 5:1 odds.

Do not worry about some of your outs being in other peoples hands.

As to your example Dave, I would argue that an A or K would also win you the hand, also AK might be ahead with a flop like that (you are only fearing a pocket pair here).

I would add an additonal 6 outs here for you to win, and maybe even think my ace high is best here.

So in actuality if I was in this hand I would give myself 15 outs so I would have a 15/47 chance of hitting with the possibility of having the best hand at the moment (If your opponent has AQ, KQ, AJ, etc.).

So instead of a 19% chance of hitting, you would probably have around a 32% chance of hitting.