It is an expression.
Based on Longman Dictionary, it means you should not make plans because you hope something good will happen.
Or, you should not trust on the future because of something good which is not for sure yet.
Sometimes we can omit the secound part of the expression:
Don't count your chickens (before they've hatched).
- For Teachers