How do they determine the number of electors for each state?

The number electors is the number of senators and representatives that particular state may have