The number refers to the number of sides on the dice. So a 1d4 has a 1,2,3 and a 4 side so the highest number it can roll is a 4. A short sword has 6 sides 1,2,3,4,5, and 6 so the highest number you can roll is a 6. The average of a d4 is 2.5 and the average of a d6 is 3.5 so a 1d6 will on average do more damage. You are correct about the longsword. Fighters are not just tanks in 5e they can do quite a lot if damage if you build them right. Rogues are more of a stealth and lots of skills based class rather than just a dps class you see in many mmo's. Also rogues have sneak attack. So the rogue with a dagger will be doing their weapon damage 1d6 for a shortsword + 1d6 sneak attack at first level. So the damage is actually a lot closer.