Also, remember that while the odds of making your flush is clear, this doesn't mean that those are the odds of actually winning the hand.

For example, you hold the A K and the board reads

7 Q 5 .

If you are up against 7 7, you will still hit your flush if the Q falls, but this will make your opponent a full house. Even is a safe diamond falls, your opponent will still have outs to beat you on the river.

The other case is pretty obvious, and that is flush over flush. Those are rare, so generally don't bother. But still, be careful when you make your flush on the turn and there is a chanse that your flush will be beaten by a higher flush on the river.

The solution to this is to not count all the remaining cards of that suit as an out, depending on reads, the board etc. (A paired boards is dangerous etc). Then you calculate your odds on your estimated number of outs.