Changed all ArrayCount variables to unique ones, as they were interfereing with one another. May change them back to local variables at some point. Added a function to count the number of windows per monitor