Slimmed down document counting method

By using 'present?' method I've shed a lot unneeded code.