Counting drawings, tables and bibliography sources

I have to add a summary to a document, such as “The document contains X pages, Y drawings, Z tables, W bibliography sources”. It is quite easy to insert the page count, but I have not found a way to count drawings, tables and sources. I need to count only tables and drawings, that have captions, so basically I need to get the max value of number ranges “Drawing” and “Table”. How can I do that?

And for the bibliography sources I use the bibliography database. How can I get the number of sources, that are referenced in the document?

Insert -> Fields -> More Fields...-> Tab: Dicoument -> Type: Statistics doesn’t provide the info you need (besides the fact it counts all images and tables, regardless of having a caption or not)?

Unfortunately, this is not possible directly.

Statistics, as suggested by @anon73440385, will show “technical information”, i.e. what is contained in the encoded document file.

However, if your tables and drawings have their own captions with a dedicated number range, I found a workaround I don’t like because it involves fiddling with the encoding.

Provided your summary line “This document contains X pages, Y drawings, Z tables” is located after the last numbered “object”, you get what you want by inserting another number. That this reference appears last is necessary because it is nothing but a new occurrence of a numbered item.

  • Insert>Field>More Fields, Variables tab.

  • Number range in Type, the relevant counter in Select

  • This is the trick ==> in Value, enter explicitly what should be displayed, i.e. Table or Drawing

    Doing so will inhibit the default formula Table + 1, giving you the current value without incrementation.

There is no solution for bibliography entries but a poor ersatz.

When you format your bibliography, you can request Number entries so that they are numbered. Reading the last line will give you the number of entries. But, this also replaces bibliography references by a numeric index instead of an id like [Author99]. See what you prefer.

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.