Calculating the number of primes between 3 and another number
No, I wouldn't say you're using too many variables (except for c, which doesn't appear to be used anywhere).  Not enough functions, though.  And perhaps too many spurious assignments.  Specifically, I'd suggest something like:

#include &lt;iostream&gt;
using namespace std;

bool isPrime(int);
int countPrimes(int);
int main() {
    int userValue;
    cout&lt;&lt; "Enter a number : "&lt;&lt; flush;
    cin &gt;&gt; userValue;

    cout &lt;&lt; "There are, " &lt;&lt; countPrimes(userValue) &lt;&lt; " number of primes from 3 to "&lt;&lt; userValue &lt;&lt; endl;    
    cout &lt;&lt; "hit enter to terminate..."&lt;&lt; flush;
    cin.get();
    cin.get();    
}

int countPrimes(int number) {
    int result = 0;
    for (int x = 3; x &lt;= number; x += 2){
        if (isPrime(x)){ 
            result++;    
        }
    }
    return result;
}

bool isPrime(int number){
    for(int i=2; i&lt;number; i++){
        if (number % i == 0 &amp;&amp; i != number) return false;
    }
    return true;
}


That will do the same thing as your code.  Also, please consider using variable names that are not just single-letters.