Calculating the number of assignments satisfying a general propositional formula
As I have mentioned in the comments, being able to determine the number of truth assignments of a generic formula in polynomial time would imply not only $\textbf{P} = \textbf{NP}$ but actually the much, much stronger $\textbf{#P} = \textbf{P}$ (see Yuval Filmus' answer).

What Papadimitriou really means in this context is that the number of truth assignments of each $\phi_i$ depends on the value of only $k$ variables, with $k$ being constant with respect to $n$. Thus, determining the number of truth assignments can be done in constant time (relative to $n$, not to $k$; for a more precise runtime bound, see again Yuval Filmus' answer).

For reference, here is the earlier paragraph from the text (emphasis mine):


  In this problem we are given a set of Boolean expressions $\Phi = \{ \phi_1 , ... , \phi_m \}$ in $n$ variables, where each [...] is a general Boolean expression involving at most $k$ of the $n$ Boolean variables, where $k &gt; 0$ is a fixed constant [...]