Document counts

This commit should fix problem with no document information when using elasticsearch version 0.90.0.