XWIKI-4410: Need a way to search attachments without programming permissions
countAttachments needs to include doc so it can be filtered.