ok, lots of stuff in this question

first of all turning your video feed to b/w will not automatically find people's silhouette; the easiest way to look for [human shapes] inside an image would be to use haar cascades (opencv will do the dirty job if you decide to go this way).
if, on the other side, you did set up your capture environment so that thresholding will do the trick, you still have to face an ugly beast of computer vision: the
blobs. the linked wikipedia page will teach you the needed theory; anyway you don't strictly have to code your own blob searching routine: again opencv has its own blob detection internal library, and in the library page of the processing site you'll find also an alternative.
finally, if you decide to simply count white pixels, you're almost done: simply increment a variable while you're thresholding. start by initializing you counter at the beginning of draw()
Code:
int whitecounter = 0;
then push the increment line in your for cycle
Code:
if (pixelBrightness > threshold) { // If the pixel is brighter than the
pixels[i] = white; // threshold value, make it white
whitecount++;
}
this way whitecounter will store the amount of white pixels in each frame