A method to calculate the algebraic entropy of a mapping, which can be lifted to an isomorphism of a suitable rational surfaces (the space of initial values), are presented. It is shown that the degree of the $n$th iterate of such a mapping is given by its action on the Picard group of the space of initial values. It is also shown by construction that the degree of the $n$th iterate of every Painlev\'e equation in Sakai's list is $O(n^2)$ and therefore its algebraic entropy is zero.