Projective module that isn't free

Let $R$ be the commutative ring $\mathbb{Z}/2\mathbb{Z}\times\mathbb{Z}/2\mathbb{Z}$ under componentwise addition and multiplication. If $P_1$ and $P_2$ are the principal ideals generated by $(1,0)$ and $(0,1)$ respectively, then $R=P_1\oplus P_2$, hence both $P_1$ and $P_2$ are projective $R$-modules.

Now, as an example in Dummit and Foote, it states that neither $P_1$ nor $P_2$ are free, as any free module is a multiple of four. Why is this so?

• A finitely generated free $R$-module is a product of a finite number of copies of $R$, and the underlying set of such a product has a cardinality which is a multiple of 4. – mfox Apr 30 '18 at 16:11

Because a free module is a direct sum of copies of $R$, and your $R$ has order $4$.