src/stringProcessing/syllables/count.js
function( word, locale ) {
	var deviationFragments = createDeviationFragmentsMemoized( syllableMatchers( locale ) );
	var remainingParts = word;
	var syllableCount = 0;

	forEach( deviationFragments, function( deviationFragment ) {
		if ( deviationFragment.occursIn( remainingParts ) ) {
			remainingParts = deviationFragment.removeFrom( remainingParts );
			syllableCount += deviationFragment.getSyllables();
		}
	} );

	return { word: remainingParts, syllableCount: syllableCount };
}
function( word, locale ) {
	var deviationFragments = createDeviationFragmentsMemoized( syllableMatchers( locale ) );
	var remainingParts = word;
	var syllableCount = 0;

	forEach( deviationFragments, function( deviationFragment ) {
		if ( deviationFragment.occursIn( remainingParts ) ) {
			remainingParts = deviationFragment.removeFrom( remainingParts );
			syllableCount += deviationFragment.getSyllables();
		}
	} );

	return { word: remainingParts, syllableCount: syllableCount };
}
function ( word , locale ) { var deviationFragments = createDeviationFragmentsMemoized ( syllableMatchers ( locale ) ) ; var remainingParts = word ; var syllableCount = 0 ; forEach ( deviationFragments , function ( deviationFragment ) { if ( deviationFragment . occursIn ( remainingParts ) ) { remainingParts = deviationFragment . removeFrom ( remainingParts ) ; syllableCount += deviationFragment . getSyllables ( ) ; } } ) ; return { word : remainingParts , syllableCount : syllableCount } ; }
Counts syllables in partial exclusions. If these are found, returns the number of syllables  found, and the modified word.
The word is modified so the excluded part isn't counted by the normal syllable counter.

@param {String} word The word to count syllables of.
@param {String} locale The locale to use for counting syllables.
@returns {object} The number of syllables found and the modified word.
Counts syllables in partial exclusions . If these are found returns the number of syllables found and the modified word . The word is modified so the excluded part isn t counted by the normal syllable counter .