What determines the number of pixels in front porch and back porch of VGA display?
Pixel Clock is related to resolution / refresh rate.
You need to clock it so that for a given horizontal line, the pixels plus porch is clocked out...

As for the porch pixels, that is dependent on the monitor, the reason for their existence is so that while the electron beam is moving back to the beginning of a row or frame, it does not show up on the screen. Basically as long as it is approximately correct it will work fine. There are charts that show the timing information based on clk and resolution. Here is one: http://www.epanorama.net/documents/pc/vga_timing.html