Actually the numbers 5 and 3 are not derived from the number of squares attacked.
They denote the power of pieces in relation to eachother, as a general rule with lots of exceptions, and reflects many material imbalances that are often comparable in strength(usually in the endgame). The unit of measurement here is the material value of a single pawn.
3(3x1) pawns are often enough compensation for for a knight(3) or a bishop(3 + ε).
3 minor pieces(3×3) are often sufficient compensation for a queen(9).
One minor piece and 2 pawns(3+2) are often sufficient for a rook(5).
Two rooks(2x5) are typically slightly stronger than a queen(9).
Two minor pieces(2x3) are typically slightly stronger than a rook(5).
There are different systems that are derived from number of squares attacked. One thing to note about these systems is that pawns are not created equal. Rook pawns attack one squares less than other pawns, for instance.