During my last experience with Cross-referencing on total counts between different files, which can be read here, a problem of saving the total number of literature references in a user defined counter appears.
There are at least two ways to save this value in auxiliary file using:
zrefpackage given by Heiko Oberdiek, see, please, herexrandrefcountpackages given by Werner, see, please, here
There are at least two ways of forming total count of literature references using:
totcountpackage given by Mike Renfro and also by Ian Thompson, see, please, here and here, respectively.\printbibliographymakro given by Maieul, see, please, here. However in this case we produce also bibliographies of difference types.
I try to get a total count of literature references by totcount and save it by zref. The problem is that command \total{citenum} returns a dirty code, e.g. \def \c@citenum@totc {\c@citenum@totc }2} for MWE, so I can not export this value to another .tex file. Note, that the last value 2 is a true value of references mentioned in a source code.
The question is how get a total number of literature references and save it to a user defined counter in a correct way? A given value should be compatible with one of the approaches to export the value to another .tex file.
The simplest way to solve the problem is to parse the following line \def \c@citenum@totc {\c@citenum@totc }2} and save symbols between last } and } in a separate counter. There can be also approaches to hack totcount or use another packages to form a total count of literature references.
MWE is a combination of this and this MWEs.
\documentclass{report}
% http://texblog.org/2012/04/16/counting-the-total-number-of/
\usepackage{totcount}
\newtotcounter{citenum}
\def\oldcite{}
\let\oldcite=\bibcite
\def\bibcite{\stepcounter{citenum}\oldcite}
\usepackage{zref-abspage, zref-lastpage}
\makeatletter
\zref@newprop{myreferences}[0]{\total{citenum}}
\zref@addprops{LastPage}{myreferences}
\makeatother
\begin{filecontents}{\jobname.bib}
@article {First,
author = "FA"
}
@article {Second,
author = "SA"
}
\end{filecontents}
\begin{document}
Some citations: \cite{First}, \cite{First}, \cite{Second}.
This document contains \total{citenum} references (possibly with multiple citations).
\bibliographystyle{plain}
\bibliography{\jobname}
\end{document}
A screenshot from an auxiliary file with highlighted part of text, which should be correct, i.e. there should be only value 2.
UPT: I've tried to modify Werner's solution, i.e. put \total{citenum} in the following code \setcounter{mycntr}{\total{citenum}} and got the error: Missing number, treated as zero. \setcounter{mycntr}{\total{citenum}}.

\citesnumfrom p.2 of [totcount package}(http://ctan.altspu.ru/macros/latex/contrib/totcount/totcount.pdf)?\the\totvalue{citesnum}? – Vladimir Parkhomenko Nov 04 '16 at 15:01