Make sure we don't try to count anything from a nil diff.
The local backend implementation is an implementation of backend.Enhanced that recreates all the behavior of the CLI but through the backend interface.