Show that $\dim H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m)) = {n + m \choose n}$ if $m \geq 0$, and $0$ otherwise. Show that $\dim H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m)) = {n + m \choose n}$ if $m \geq 0$, and $0$ if $m < 0$. This statement came up in an algebraic geometry text with no explanation provided, and I'm trying to understand why it's true. 
Thoughts so far: 
Since $H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m))$ is the vector space of regular sections of $\mathcal{O}_{\mathbb{P}^n}(m)$ over $\mathbb{P}^n$, we can try to find a basis. Since the regular sections are the degree $m$ polynomials in $x_0, \dots, x_n$, it seems like the collection of degree $m$ monomials in $x_0, \dots, x_n$ should work. But I don't see how there are ${n + m \choose n}$ of these. Is it just a basic counting argument that I'm struggling with?
On a side note, I think I understand what global sections of $\mathcal{O}_{\mathbb{P}^n}(m)$ look like, but how can we describe the regular sections over a distinguished open set $D(f)$? Is it something like degree $m$ polynomials with denominator $f$?
 A: I think it is indeed just the basic counting argument you are lacking. To see that there are $\binom{n+m}{n}$ monomials in $x_0,\ldots, x_n$ of degree $m$, for me it is helpful to think about the equivalent question: how many ways can you divide $m$ unlabeled balls among $n+1$ labelled bins (corresponding to the variables $x_0,\ldots, x_n$)? Any such division can be represented (uniquely) by a pictorial representation of balls 'O' divided by lines '|'. For example, the picture 
OOO|O||OO|O
represents a way of dividing up 7 balls into 5 labelled bins. The first bin has 3 balls, the second has 1, the third is empty, the fourth has 2, and the fifth bin has 1 ball. In terms of monomials, we might think of this as the monomial $x_0^3x_1x_3^2x_4$.
This establishes a bijection between possible divisions (i.e., monomials) and strings of length $n+m$ consisting of $m$ balls 'O' and $n$ lines '|'. Any such string is determined uniquely by the choice of position of the lines, i.e., in choosing a set of $n$ positions from a possible $n+m$ positions. Thus the total number of monomials is $\binom{n+m}{n}$. 
I hope this answer was clear!
A: About your side note question:  
If  $f\in H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m))$ is a homogeneous polynomial of degree $m$, then the open subset $D(f)\subset \mathbb{P}^n$ is an affine variety (this can be seen with the Veronese embedding of degree $m$).
The restriction of $ \mathcal{O}_{\mathbb{P}^n}(m))$  to $D(f)$ is the trivial line bundle.
The $k$-algebra $ H^0(D(f), \mathcal{O}_{\mathbb{P}^n}(m))=H^0(D(f), \mathcal{O}_{\mathbb{P}^n})$ is then infinite-dimensional, and so  also is the space of sections of any line bundle on $D(f)$.
Actually any line bundle on $D(f)$ is the restriction of some line bundle on $\mathbb{P}^n$ because of the exact sequence $$\mathbb Z\to \text {Cl}(\mathbb{P}^n)\to \text {Cl}(D(f))\to 0$$ (Hartshorne II, Prop. 6.5 (c)) 
The simplest example is to take $f=x_0^m\in H^0(\mathbb{P}^n, \mathcal{O}_{\mathbb{P}^n}(m))$, so that $D(f)=\mathbb A^n$ and since all line bundles $L$ on $\mathbb A^n$ are trivial, we have $$H^0(\mathbb{A}^n_k, L)=H^0(\mathbb{A}^n_k, \mathcal O)=k[x_0,\cdots ,x_n] $$
