Diagonal Problem

When you move the point around to change the size of your rectangle, you will notice that the diagonal passes through certain squares and misses others. When the rectangle is small, it is easy to simply count the squares. [b]Question:[/b] [color=#c51414]How many shaded squares would there be in an n x m rectangle? [b]Kid Friendly:[/b] How could you find out the number of colored squares without counting? [/color]