In second approach you can eliminate usage of boolean flag, and condition check in second while loop. Also with some comments this code becomes easier to understand:
public static int GetWordsCount(string text)
{        
    int count = 0;
    for (int i = 0; i < text.Length; )
    {   
        // process to next word 
        while ((i < text.Length) && (text[i] == ' '))
            i++;
        if (i < text.Length)
            count++;
        // loop till the word end
        while ((i < text.Length) && (text[i] != ' '))
            i++;            
    }
    return count;
}