Nursery school teachers ask very young children to clap out the syllables in words, so it must be easy to count the number of syllables in a word, right? No, far from it. How many syllables are there in the words hour, fire, bottle, rhythm, William, Italian and layer? Ask your friends; I bet they will give different answers.
Take layer, for instance; if you pronounce it lay-yer (as some English accents do), that's two syllables, the first one has a diphthong and the second syllable has a monophthong. However, for many speakers of English layer is one syllable containing a triphthong, a composite vowel sound made up of three different vowel sounds.
So what exactly is a syllable? Here's the simple definition (from the New Oxford Dictionary of English): "a unit of pronunciation having one vowel sound, with or without surrounding consonants". And here's the technical definition (from SIL, an organisation that documents the world's lesser-known languages) : "a unit of sound composed of a central peak of sonority (usually a vowel), and the consonants that cluster around this central peak".
When counting syllables, we go by the way the word is spoken, rather than the way it is written. So, the m of rhythm would be seen as a syllabic m, and rhythm, therefore, has two syllables. The l of bottle is syllabic too. Hour and fire are generally considered to be monosyllabic words containing a triphthong. The way I pronounce William means it has two syllables, and the way I pronounce Italian makes it a three-syllable word.