Japanese uses pitch accent, where every mora can either be pronounced with a high or low pitch. Not all dictionaries will indicate this, but pitch accent is certainly important, because it can make the difference between different words.
For example, using bold for high pitches:
いま (今) - "now"
いま (居間) - "living room"
Pitch is, however, to some extent a characteristic of regional accents, so a Kanto speaker may be using the opposite pitches to a Kansai speaker. Where pitch is taught, it will be standard Japanese (essentially the Tokyo dialect). Pitchless Japanese is easily understood by native speakers and incorrect pitch will at most sound somewhat odd. Studying pitch, therefore, isn't essential to the learning Japanese and is perhaps best picked up by conversing with native speakers.
Linguists, however, tend to classify Japanese as having a falling pitch following what is considered the stressed vowel.
Consonant-Vowel Combinations written as Digraphs count as 1 syllable. These are cases where you have き、ぎ、し、じ、ち、に、ひ、び、ぴ、み、り combined with や、ゆ、and よ to form Digraphs like きゃ, しゅ, ちょ, etc.
So, the ちゅ in 中国[ちゅうごく] accounts for 1 syllable. The whole word is 4 syllables.
A vowel combination counts as 2 syllables. Combinations like おう、えい are 2 syllables. This also includes a vowel being written or said twice, like おお、いい, etc.
Ex. the せい in the word 人生[じんせい] or the おう in だろう would count as 2 syllables.
The syllable ん counts as 1 syllable, even though in English it doesn't seem to change the syllable count.
Ex. The ん in 先生[せんせい] is the 2nd syllable in the word, and the whole word has 4 syllables.
The small tsu (っ) which doubles a consonant adds 1 syllable.
Ex. the word 学校(がっこう) has 4 syllables.
This is all important information to know when reading pitch accent, and counting Japanese syllables.
When dictionaries give pitch accent, they'll usually indicate it with a number. The number tells you the mora where the last high pitch is. To figure out the pitch pattern, put a low onto the first mora (unless the last high pitch is on that mora), put high pitches onto all the mora that follows, until you hit the last high pitch. After that, put low pitches.
Even more helpful dictionaries will do all of this work for you, by telling you exactly where all the pitches rise or fall.
So, to give some examples.
|low HIGH HIGH... |
|HIGH low low... |
|low HIGH low low... |
|low HIGH HIGH low low... |
|low HIGH HIGH HIGH low low... |
|おとうと||弟||(one's) younger brother|
Notice how ともだち (0) and おとうと (4) look as though they have the same pitch pattern despite the different numbers. The difference is based on the grammatical pattern like -は added afterward. Therefore, the continuation of both pitch pattern becomes ともだちは and おとうとは.