The most important thing is to be consistent and not make any exceptions. If you say no second, third, or fourth cousins, don't invite one or two of these. Usually you invite married guests' spouses. Lots of times you invite single guests' significant others, but if you have to keep the number down, you can ask the single people to come alone. If your parents are divorced and one or both are remarried, you will probably want to invite your stepparents.
Stepparents sometimes play a role in the ceremony or in the preparation or payment for the wedding.
Make sure your natural parents are appropriately honored at the ceremony, however. If there is any tension between divorced parents, talk to them about how special this day is to you and seat them far apart from each other, without making either of them feel like they're being banished from the rest of the party. During the ceremony, the bride's family usually sits on the left, and the groom's family sits on the right. At the reception, try to have eight to ten people at a table. Try to be considerate of the guests.