I don't think that 4-8 weeks is long enough to do Panama-Guatemala. But, traveling pace varies quite a bit for different people. I spent 4 weeks in Guatemala and Honduras and still didn't have time to see a lot of things. I had 10 days in Costa Rica but was moving around quite a bit. Also, if you're really on a tight budget, Costa Rica is relatively expensive.
Frommers.com has some nice suggested itineraries for one-two weeks in each of these countries to give you a sense of what you can do in a set time period. Also, Lonely Planet forums has a lot of information about making trips across Central America with topics about transportation, safety, costs, etc.