A rectangle is simply a set of 2 parralel lines, if we split it up into h horizontal and v vertical lines we have that there h-1 and v-1 parts, so we need all the combinations of these. Hence we get ...