It depends...
Kuching is a "big" place, because it has a large hinterland with lots of things to see and do. You can easily spend an entire week in the Kuching area.
KL is not too terribly interesting, so you can just spend two days there (or even cut it to one). Melaka can be done as an overnight trip from KL (leave KL in the morning by bus, return to KL the next day), which allows you to see all main sights.
Pinang is again an a bit bigger place, for which you can plan 2-3 days.
You can easily do much more than four destinations in two weeks, but it all depends on your style of travel and what kind of travel speed you feel comfortable with. I like to be in a different place every day, other people like to spend several days in the same place.