 <p>I haven't tested this, but it seems like it should work off the top of my head.</p> <pre><code>int spacesCount = 0; NSRange textRange; textRange = [string rangeOfString:@" "]; if(textRange.location != NSNotFound) { spacesCount = spacesCount++; } NSLog(@"Spaces Count: %i", spacesCount); </code></pre>