Both the front and rear wheels use two different types of spokes, 20 of one kind on the front wheel plus 20 of the other kind. Same thing is true for the rear wheel. The difference, other than length, is the angle of the bend and the length of wire after the bend.
There is a more important point though. If you have to ask how many spokes are required* its not very likely you are going to have much luck lacing the wheel, let alone truing it. On top of having to buy the spokes and nipples you will also need a spoke wrench, some sort of holding stand for the wheel, and a dial indicator and associated mounting blocks/clamps/rods.
* why didn't you just count the number of spokes in your wheels?