count rectangle modified