Thread:Extension talk:Cite/Number of references

Is there a way to get the number of references on a page? I am trying to get the ref-list to automatically appear on pages but I don't want it to appear if there are no references being used.