well you need to interface the windows api. what if the user is running
unix? what then, will it still count the windows? i doubt it. perhaps
your solution would be in the from of C. i suggest you use C, but even
then its not ideal. you could try using JNI, but then you will have
written something close to C++, so why not write a client program in
c++?
sorry about wordy reply, javascript could possibly count the browser
windows, why do you need this? are you trying to see if a user has a
window already open?