How many squares are in a grid?

n × m
14