If you’re looking just at carbon-carbon bonds, this diene would indeed have two double bonds and two single bonds.
But the hydrogen atoms in this molecule are also covalently bonded to the carbon atoms. All the carbon–hydrogen bonds here are single bonds, and there are eight such bonds.
So, in sum, this molecule (1,4-pentadiene) has ten single bonds (two C–C single bonds and eight C–H single bonds) and two double bonds (both C=C).