Given an integer n, print all integers from 1 to 2^n. Why does this not prove that P!=NP?
NP is the set of problems that can be verified in polynomial time, i.e. there is a polynomial-time algorithm that can verify a purported solution. P is the set of problems that can be solved in polynomial time, i.e. there is a polynomial-time algorithm that can find a solution.

“The problems in NP are those not able to be solved in polynomial time” is completely wrong. This is not at all what NP means. The N in NP is for “nondeterministic”, not for “not”. A problem in NP may be solvable in polynomial time — P is a subset of NP. The question “P = NP?” is in fact whether all problems in NP are solvable in polynomial time.

The set of problems that cannot be solved in polynomial time is the complement of P.

Note that “problem” has a specific technical meaning: it's a decision problem, i.e. an function from some input space to $\{\mathrm{yes}, \mathrm{no}\}$.

Counting is not a decision problem, so it doesn't fit in the classification that includes P and NP.

If you found a decision problem that cannot be solved in less than $2^n$ steps where $n$ is the size of the input, then that problem would not be in P. It might not be in NP either: it would only be in NP if there was a way to verify a solution in polynomial time.