It can be tricky. I always need to use a finger to tap out the syllables on a table or my leg to make sure I have the right count. I just found this online that might help you until you get the hang of it.
Syllable Counter - Poem & Lyric Workshop
(Edit: I was testing out the counter and it was actually wrong so I tested a few more to find one that is more reliable. These tools are a start but they aren't perfect. The more you practice, the easier it will get to do it yourself.)
Just write something and then check it with the calculator. If it's too many and you aren't sure which word is the problem, paste each word in the line separately. After a while, I am.betting that you will get a better sense of how to count without using the calculator.