I added a counter to the todonotes packages \todo so I could display the total number of todos I have left. However I also enjoy working with the package option disabled. Therefore I would like to wrap the part where I typeset the counter in a conditional that is only executed when the packageoption disable is NOT given. However I do not know how I can access this package option.
MWE:
\documentclass{report}
\usepackage{letltxmacro} %properly rename protected macros
\usepackage{totcount} %counter totals before last increment
\usepackage{xcolor} %for the red text (will be loaded by todonotes but for completness)
\usepackage{todonotes}
\usepackage{hyperref} %make links in listoftodos clickable
\newtotcounter{todocounter}
\LetLtxMacro{\oldTodo}{\todo} %avoid endless recursion be redefining \todo as \todo+x
\renewcommand{\todo}[2][]{\stepcounter{todocounter}\oldTodo[#1]{#2}}
\begin{document}
\LARGE{\textcolor{red}{\total{todocounter} todos left}} %if wrap this line
\todo{1}
later
\todo{some more}
\listoftodos
\end{document}